Browse Source

pet debugging

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
2b63ed08b8
  1. 25
      src/engine/gameManager/PowersManager.java

25
src/engine/gameManager/PowersManager.java

@ -330,7 +330,13 @@ public enum PowersManager { @@ -330,7 +330,13 @@ public enum PowersManager {
if (pb.targetFromLastTarget() || pb.targetPet()) // use msg's target
if (pb.isAOE()) {
if (!pb.usePointBlank()) {
AbstractWorldObject target = getTarget(msg);
AbstractWorldObject target;
if(msg.getTargetType() == 37 && Mob.dynamic_pets.get(msg.getTargetID()) != null){
Mob pet = Mob.dynamic_pets.get(msg.getTargetID());
target = pet;
}else{
target = getTarget(msg);
}
if (target != null && target.getObjectType() == GameObjectType.Building && !pb.targetBuilding()) {
PowersManager.sendPowerMsg(playerCharacter, 9, new PerformActionMsg(msg));
@ -356,7 +362,6 @@ public enum PowersManager { @@ -356,7 +362,6 @@ public enum PowersManager {
}else{
target = getTarget(msg);
}
ChatManager.chatSystemInfo(PlayerCharacter.getPlayerCharacter(msg.getSourceID()), "Target Acquired: " + target.getName());
if (target == null) {
return true;
}
@ -596,7 +601,13 @@ public enum PowersManager { @@ -596,7 +601,13 @@ public enum PowersManager {
if (pb.targetFromLastTarget() || pb.targetPet()) // use msg's target
if (pb.isAOE()) {
if (!pb.usePointBlank()) {
AbstractWorldObject target = getTarget(msg);
AbstractWorldObject target;
if(msg.getTargetType() == 37 && Mob.dynamic_pets.get(msg.getTargetID()) != null){
Mob pet = Mob.dynamic_pets.get(msg.getTargetID());
target = pet;
}else{
target = getTarget(msg);
}
if (target == null) {
@ -611,7 +622,13 @@ public enum PowersManager { @@ -611,7 +622,13 @@ public enum PowersManager {
}
} else {
// get target
AbstractWorldObject target = getTarget(msg);
AbstractWorldObject target;
if(msg.getTargetType() == 37 && Mob.dynamic_pets.get(msg.getTargetID()) != null){
Mob pet = Mob.dynamic_pets.get(msg.getTargetID());
target = pet;
}else{
target = getTarget(msg);
}
if (target == null)
return true;

Loading…
Cancel
Save