duplicate zoneMobSet additions fixed
This commit is contained in:
@@ -806,6 +806,8 @@ public class Mob extends AbstractIntelligenceAgent {
|
||||
mob.npcOwner = guardCaptain;
|
||||
mob.spawnTime = (int)(-2.500 * guardCaptain.building.getRank() + 22.5) * 60;
|
||||
mob.BehaviourType = Enum.MobBehaviourType.GuardMinion;
|
||||
mob.parentZone = parent;
|
||||
parent.zoneMobSet.add(mob);
|
||||
return mob;
|
||||
}
|
||||
|
||||
|
||||
@@ -918,10 +918,10 @@ public class NPC extends AbstractCharacter {
|
||||
if (this.parentZone != null) {
|
||||
if (zone.getObjectUUID() != this.parentZone.getObjectUUID()) {
|
||||
this.parentZone.zoneNPCSet.remove(this);
|
||||
zone.zoneNPCSet.add(this);
|
||||
//zone.zoneNPCSet.add(this);
|
||||
}
|
||||
} else {
|
||||
zone.zoneNPCSet.add(this);
|
||||
//zone.zoneNPCSet.add(this);
|
||||
}
|
||||
} else if (this.parentZone != null) {
|
||||
this.parentZone.zoneNPCSet.remove(this);
|
||||
@@ -988,6 +988,9 @@ public class NPC extends AbstractCharacter {
|
||||
if (npcWithoutID.mobBase == null) {
|
||||
return null;
|
||||
}
|
||||
if (parent != null) {
|
||||
npcWithoutID.setRelPos(parent, spawn.x - parent.absX, spawn.y - parent.absY, spawn.z - parent.absZ);
|
||||
}
|
||||
NPC npc;
|
||||
try {
|
||||
npc = DbManager.NPCQueries.ADD_NPC(npcWithoutID, isMob);
|
||||
|
||||
Reference in New Issue
Block a user