|
|
@ -42,6 +42,8 @@ import static engine.net.client.msg.ErrorPopupMsg.sendErrorPopup; |
|
|
|
public class Mob extends AbstractIntelligenceAgent { |
|
|
|
public class Mob extends AbstractIntelligenceAgent { |
|
|
|
|
|
|
|
|
|
|
|
private static int staticID = 0; |
|
|
|
private static int staticID = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static HashMap<Integer,Mob> dynamic_pets = new HashMap<>(); |
|
|
|
//mob specific
|
|
|
|
//mob specific
|
|
|
|
public final ConcurrentHashMap<Integer, Float> playerAgroMap = new ConcurrentHashMap<>(); //key = Player value = hate value
|
|
|
|
public final ConcurrentHashMap<Integer, Float> playerAgroMap = new ConcurrentHashMap<>(); //key = Player value = hate value
|
|
|
|
|
|
|
|
|
|
|
@ -561,7 +563,8 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
|
|
|
|
|
|
|
|
petMinion.despawned = false; |
|
|
|
petMinion.despawned = false; |
|
|
|
petMinion.runAfterLoad(); |
|
|
|
petMinion.runAfterLoad(); |
|
|
|
DbManager.addToCache(petMinion); |
|
|
|
//DbManager.addToCache(petMinion);
|
|
|
|
|
|
|
|
Mob.dynamic_pets.put(petMinion.getObjectUUID(),petMinion); |
|
|
|
petMinion.setLoc(petMinion.bindLoc); |
|
|
|
petMinion.setLoc(petMinion.bindLoc); |
|
|
|
|
|
|
|
|
|
|
|
return petMinion; |
|
|
|
return petMinion; |
|
|
@ -933,7 +936,9 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
this.playerAgroMap.clear(); |
|
|
|
this.playerAgroMap.clear(); |
|
|
|
WorldGrid.RemoveWorldObject(this); |
|
|
|
WorldGrid.RemoveWorldObject(this); |
|
|
|
|
|
|
|
|
|
|
|
DbManager.removeFromCache(this); |
|
|
|
//DbManager.removeFromCache(this);
|
|
|
|
|
|
|
|
if(Mob.dynamic_pets.containsKey(this.getObjectUUID())) |
|
|
|
|
|
|
|
Mob.dynamic_pets.remove(this.getObjectUUID()); |
|
|
|
PlayerCharacter petOwner = (PlayerCharacter) this.guardCaptain; |
|
|
|
PlayerCharacter petOwner = (PlayerCharacter) this.guardCaptain; |
|
|
|
|
|
|
|
|
|
|
|
if (petOwner != null) { |
|
|
|
if (petOwner != null) { |
|
|
|