fixed tons of null pointers after loading objects from db

This commit is contained in:
Light2
2014-05-04 22:47:05 +02:00
parent a4216f76b5
commit ae33de15c5
17 changed files with 71 additions and 36 deletions
@@ -210,11 +210,19 @@ public class CreatureObject extends TangibleObject implements Serializable {
@Override
public void initAfterDBLoad() {
super.init();
defendersList = new Vector<TangibleObject>();
duelList = Collections.synchronizedList(new ArrayList<CreatureObject>());
cooldowns = new ConcurrentHashMap<String, Long>();
performanceAudience = new Vector<CreatureObject>();
messageBuilder = new CreatureMessageBuilder(this);
dotList.init();
buffList.init();
equipmentList.init();
appearanceEquipmentList.init();
missionCriticalObjects.init();
abilities.init();
skillMods.init();
skillMods.forEach((name, skillMod) -> skillMod.init());
}
private void loadTemplateData() {
@@ -1073,9 +1081,7 @@ public class CreatureObject extends TangibleObject implements Serializable {
}
public SWGList<Long> getEquipmentList() {
synchronized(objectMutex) {
return equipmentList;
}
}
public SWGList<Buff> getBuffList() {