Browse Source

pet debugging

lakebane-master
FatBoy-DOTC 10 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 {
if (pb.targetFromLastTarget() || pb.targetPet()) // use msg's target if (pb.targetFromLastTarget() || pb.targetPet()) // use msg's target
if (pb.isAOE()) { if (pb.isAOE()) {
if (!pb.usePointBlank()) { 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()) { if (target != null && target.getObjectType() == GameObjectType.Building && !pb.targetBuilding()) {
PowersManager.sendPowerMsg(playerCharacter, 9, new PerformActionMsg(msg)); PowersManager.sendPowerMsg(playerCharacter, 9, new PerformActionMsg(msg));
@ -356,7 +362,6 @@ public enum PowersManager {
}else{ }else{
target = getTarget(msg); target = getTarget(msg);
} }
ChatManager.chatSystemInfo(PlayerCharacter.getPlayerCharacter(msg.getSourceID()), "Target Acquired: " + target.getName());
if (target == null) { if (target == null) {
return true; return true;
} }
@ -596,7 +601,13 @@ public enum PowersManager {
if (pb.targetFromLastTarget() || pb.targetPet()) // use msg's target if (pb.targetFromLastTarget() || pb.targetPet()) // use msg's target
if (pb.isAOE()) { if (pb.isAOE()) {
if (!pb.usePointBlank()) { 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) { if (target == null) {
@ -611,7 +622,13 @@ public enum PowersManager {
} }
} else { } else {
// get target // 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) if (target == null)
return true; return true;

Loading…
Cancel
Save