diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index effde051..c5603eda 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -552,6 +552,7 @@ public class Mob extends AbstractIntelligenceAgent { petMinion.level = level; petMinion.loadID = loadID; + petMinion.bindLoc = petOwner.getLoc(); petMinion.loc = petOwner.getLoc(); petMinion.guardCaptain = petOwner; petMinion.parentZoneUUID = parent.getObjectUUID(); @@ -562,7 +563,7 @@ public class Mob extends AbstractIntelligenceAgent { petMinion.runAfterLoad(); DbManager.addToCache(petMinion); createLock.writeLock().unlock(); - + petMinion.setLoc(petMinion.bindLoc); return petMinion; } public static Mob getMob(int id) { @@ -741,7 +742,6 @@ public class Mob extends AbstractIntelligenceAgent { public void setOwner(PlayerCharacter value) { - this.guardCaptain = value; } diff --git a/src/engine/powers/poweractions/CreateMobPowerAction.java b/src/engine/powers/poweractions/CreateMobPowerAction.java index b36005c3..ca9b11c8 100644 --- a/src/engine/powers/poweractions/CreateMobPowerAction.java +++ b/src/engine/powers/poweractions/CreateMobPowerAction.java @@ -12,7 +12,6 @@ package engine.powers.poweractions; import engine.Enum; import engine.InterestManagement.WorldGrid; import engine.gameManager.DbManager; -import engine.gameManager.MovementManager; import engine.gameManager.NPCManager; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; @@ -84,8 +83,6 @@ public class CreateMobPowerAction extends AbstractPowerAction { WorldGrid.RemoveWorldObject(currentPet); currentPet.setCombatTarget(null); - //if (currentPet.getParentZone() != null) - //currentPet.getParentZone().zoneMobSet.remove(currentPet); seaFloor.zoneMobSet.remove(currentPet); currentPet.playerAgroMap.clear(); @@ -95,7 +92,6 @@ public class CreateMobPowerAction extends AbstractPowerAction { Logger.error(e.getMessage()); } - //currentPet.disableIntelligence(); } else if (currentPet != null && currentPet.isSiege()) { currentPet.agentType = Enum.AIAgentType.MOBILE; currentPet.setOwner(null); @@ -106,7 +102,6 @@ public class CreateMobPowerAction extends AbstractPowerAction { } //remove 10th pet - NPCManager.spawnNecroPet(owner, pet); } else { //is not a necro pet @@ -137,26 +132,9 @@ public class CreateMobPowerAction extends AbstractPowerAction { NPCManager.resetNecroPets(owner); } } - /* if(owner.getPet() != null) { - if(owner.getPet().getMobBaseID() != 12021 && owner.getPet().getMobBaseID() != 12022) { - //if not a necro pet, remove pet - WorldGrid.removeWorldObject(owner.getPet()); - owner.getPet().disableIntelligence(); - Mob.removePet(owner.getPet().getUUID()); - owner.setPet(null); - } - else { - //if it is a necro pet, add it to the line and set as mob - owner.getPet().setMob(); - } - }*/ - - // if (mobID == 12021 || mobID == 12022) //Necro Pets - // pet.setPet(owner, true); + owner.setPet(pet); - if(pet.isSiege() == false) { - MovementManager.translocate(pet, owner.getLoc(), owner.region); - } + pet.recalculateStats(); pet.healthMax = pet.level * 0.5f * 120; pet.setHealth(pet.healthMax);