|
|
@ -349,12 +349,14 @@ public enum PowersManager { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// get target
|
|
|
|
// get target
|
|
|
|
AbstractWorldObject target = getTarget(msg); |
|
|
|
AbstractWorldObject target; |
|
|
|
if(target == null && msg.getTargetType() == 37 && Mob.dynamic_pets.get(msg.getTargetID()) != null){ |
|
|
|
if(msg.getTargetType() == 37 && Mob.dynamic_pets.get(msg.getTargetID()) != null){ |
|
|
|
Mob pet = Mob.dynamic_pets.get(msg.getTargetID()); |
|
|
|
Mob pet = Mob.dynamic_pets.get(msg.getTargetID()); |
|
|
|
target = pet; |
|
|
|
target = pet; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
target = getTarget(msg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
ChatManager.chatSystemInfo(PlayerCharacter.getPlayerCharacter(msg.getSourceID()), "Target Acquired: " + target.getName()); |
|
|
|
if (target == null) { |
|
|
|
if (target == null) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -2223,11 +2225,8 @@ public enum PowersManager { |
|
|
|
|
|
|
|
|
|
|
|
private static AbstractWorldObject getTarget(PerformActionMsg msg) { |
|
|
|
private static AbstractWorldObject getTarget(PerformActionMsg msg) { |
|
|
|
|
|
|
|
|
|
|
|
PlayerCharacter pc = PlayerCharacter.getPlayerCharacter(msg.getSourceID()); |
|
|
|
|
|
|
|
int type = msg.getTargetType(); |
|
|
|
int type = msg.getTargetType(); |
|
|
|
int UUID = msg.getTargetID(); |
|
|
|
int UUID = msg.getTargetID(); |
|
|
|
ChatManager.chatSystemInfo(pc,"Mob Type ID: " + GameObjectType.Mob.ordinal()); |
|
|
|
|
|
|
|
ChatManager.chatSystemInfo(pc,"Target Type ID: " + type); |
|
|
|
|
|
|
|
if (type == -1 || type == 0 || UUID == -1 || UUID == 0) { |
|
|
|
if (type == -1 || type == 0 || UUID == -1 || UUID == 0) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|