Prevent isSkillAllowed lock by SkillTreesData loading status variable.
This commit is contained in:
parent
7a20f03af5
commit
8ebd210ac3
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1692,7 +1691,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1692,7 +1691,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1692,7 +1691,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1692,7 +1691,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1692,7 +1691,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1692,7 +1691,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1694,7 +1693,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1717,7 +1716,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1680,7 +1679,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1680,7 +1679,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1680,7 +1679,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1680,7 +1679,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1680,7 +1679,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -116,7 +115,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -129,7 +128,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -160,7 +159,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1703,7 +1702,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import java.util.Map;
|
|||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
/** Parent class Ids are read from XML and stored in this map, to allow easy customization. */
|
||||||
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
private static final Map<ClassId, ClassId> _parentClassMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
private final AtomicBoolean _isLoading = new AtomicBoolean();
|
private boolean _loading = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new skill trees data.
|
* Instantiates a new skill trees data.
|
||||||
@ -130,7 +129,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
@Override
|
@Override
|
||||||
public void load()
|
public void load()
|
||||||
{
|
{
|
||||||
_isLoading.set(true);
|
_loading = true;
|
||||||
|
|
||||||
_classSkillTrees.clear();
|
_classSkillTrees.clear();
|
||||||
_collectSkillTree.clear();
|
_collectSkillTree.clear();
|
||||||
@ -161,7 +160,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
// Logs a report with skill trees info.
|
// Logs a report with skill trees info.
|
||||||
report();
|
report();
|
||||||
|
|
||||||
_isLoading.set(false);
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1680,7 +1679,7 @@ public class SkillTreesData implements IXmlReader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prevent accidental skill remove during reload
|
// Prevent accidental skill remove during reload
|
||||||
if (_isLoading.get())
|
if (_loading)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user