Fixes de-syncing problem with Factory and their NPCs

This commit is contained in:
simon 2018-01-05 19:45:51 -05:00
parent 9bc3cbf4ce
commit 0dc4ddca0f

View File

@ -54,11 +54,14 @@ public class Factory extends GameObject implements Updatable {
for (Object id : tmpNpcArray) { for (Object id : tmpNpcArray) {
NonPlayerCharacter npc = (NonPlayerCharacter) GameServer.INSTANCE.getGameUniverse().getObject((int) (long) id); NonPlayerCharacter npc = (NonPlayerCharacter) GameServer.INSTANCE.getGameUniverse().getObject((int) (long) id);
npc.setFactory(this);
if (npc != null) {
npc.setFactory(this);
npcs.add(npc); npcs.add(npc);
} }
}
} else { } else {
if (cooldown == 0) { if (cooldown == 0) {