From 2b63ed08b831dac7bb7c8c6d12d9c23f2812a0c8 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 29 Feb 2024 19:46:01 -0600 Subject: [PATCH] pet debugging --- src/engine/gameManager/PowersManager.java | 25 +++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/engine/gameManager/PowersManager.java b/src/engine/gameManager/PowersManager.java index 9f685383..b81534a5 100644 --- a/src/engine/gameManager/PowersManager.java +++ b/src/engine/gameManager/PowersManager.java @@ -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 { }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 { 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 { } } 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;