|
|
@ -309,16 +309,18 @@ public class MobAI { |
|
|
|
if (mob == null) |
|
|
|
if (mob == null) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (mob.isPlayerGuard() == true) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int contractID; |
|
|
|
int contractID = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (mob.isPlayerGuard() == true) { |
|
|
|
|
|
|
|
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDCAPTAIN)) |
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) |
|
|
|
contractID = mob.guardCaptain.contract.getContractID(); |
|
|
|
contractID = mob.guardCaptain.contract.getContractID(); |
|
|
|
else |
|
|
|
else |
|
|
|
contractID = mob.contract.getContractID(); |
|
|
|
contractID = mob.contract.getContractID(); |
|
|
|
|
|
|
|
|
|
|
|
//exception for werewolf and werebear guard captains
|
|
|
|
//exception for werewolf and werebear guard captains
|
|
|
|
|
|
|
|
|
|
|
|
if (Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false && contractID != 980111 && contractID != 980110) |
|
|
|
if (Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false && contractID != 980111 && contractID != 980110) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
@ -331,7 +333,7 @@ public class MobAI { |
|
|
|
// Mobile has no powers defined in mobbase or contract..
|
|
|
|
// Mobile has no powers defined in mobbase or contract..
|
|
|
|
|
|
|
|
|
|
|
|
if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() && |
|
|
|
if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() && |
|
|
|
mob.getContract() != null && PowersManager.getPowersForRune(mob.getContract().getObjectUUID()).isEmpty()) |
|
|
|
PowersManager.getPowersForRune(contractID).isEmpty()) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
if (mob.nextCastTime == 0) |
|
|
|
if (mob.nextCastTime == 0) |
|
|
@ -372,10 +374,10 @@ public class MobAI { |
|
|
|
ArrayList<RunePowerEntry> contractEntries = new ArrayList<>(); |
|
|
|
ArrayList<RunePowerEntry> contractEntries = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
if (mob.contract != null) |
|
|
|
if (mob.contract != null) |
|
|
|
contractEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.contractUUID)); |
|
|
|
contractEntries = PowersManager.getPowersForRune(mob.contractUUID); |
|
|
|
|
|
|
|
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) |
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) |
|
|
|
contractEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.guardCaptain.contractUUID)); |
|
|
|
contractEntries = PowersManager.getPowersForRune(mob.guardCaptain.contractUUID); |
|
|
|
|
|
|
|
|
|
|
|
powerEntries.addAll(contractEntries); |
|
|
|
powerEntries.addAll(contractEntries); |
|
|
|
|
|
|
|
|
|
|
@ -473,10 +475,10 @@ public class MobAI { |
|
|
|
ArrayList<RunePowerEntry> contractEntries = new ArrayList<>(); |
|
|
|
ArrayList<RunePowerEntry> contractEntries = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
if (mob.contract != null) |
|
|
|
if (mob.contract != null) |
|
|
|
contractEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.contractUUID)); |
|
|
|
contractEntries = PowersManager.getPowersForRune(mob.contractUUID); |
|
|
|
|
|
|
|
|
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) |
|
|
|
if (mob.agentType.equals(Enum.AIAgentType.GUARDMINION)) |
|
|
|
contractEntries = new ArrayList<>(PowersManager.getPowersForRune(mob.guardCaptain.contractUUID)); |
|
|
|
contractEntries = PowersManager.getPowersForRune(mob.guardCaptain.contractUUID); |
|
|
|
|
|
|
|
|
|
|
|
powerEntries.addAll(contractEntries); |
|
|
|
powerEntries.addAll(contractEntries); |
|
|
|
|
|
|
|
|
|
|
|