Browse Source

duplicate zoneMobSet additions fixed

master
FatBoy-DOTC 2 years ago
parent
commit
f99698feda
  1. 2
      src/engine/objects/Mob.java
  2. 3
      src/engine/objects/NPC.java

2
src/engine/objects/Mob.java

@ -806,8 +806,6 @@ public class Mob extends AbstractIntelligenceAgent {
mob.npcOwner = guardCaptain; mob.npcOwner = guardCaptain;
mob.spawnTime = (int)(-2.500 * guardCaptain.building.getRank() + 22.5) * 60; mob.spawnTime = (int)(-2.500 * guardCaptain.building.getRank() + 22.5) * 60;
mob.BehaviourType = Enum.MobBehaviourType.GuardMinion; mob.BehaviourType = Enum.MobBehaviourType.GuardMinion;
//add mob to zone set of captain
guardCaptain.getParentZone().zoneMobSet.add(mob);
return mob; return mob;
} }

3
src/engine/objects/NPC.java

@ -984,9 +984,6 @@ public class NPC extends AbstractCharacter {
(short) 1, (short) 1, (short) 1, guild, (byte) 0, 0, isMob, building, contractID, parent); (short) 1, (short) 1, (short) 1, guild, (byte) 0, 0, isMob, building, contractID, parent);
npcWithoutID.setLevel(level); npcWithoutID.setLevel(level);
if (parent != null) {
npcWithoutID.setRelPos(parent, spawn.x - parent.absX, spawn.y - parent.absY, spawn.z - parent.absZ);
}
if (npcWithoutID.mobBase == null) { if (npcWithoutID.mobBase == null) {
return null; return null;

Loading…
Cancel
Save