Browse Source

mob casting temporarily disabled

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
58f250fa64
  1. 52
      src/engine/mobileAI/MobAI.java

52
src/engine/mobileAI/MobAI.java

@ -316,44 +316,44 @@ public class MobAI {
} }
public static boolean canCast(Mob mob) { public static boolean canCast(Mob mob) {
return false;
try { //try {
// Performs validation to determine if a // Performs validation to determine if a
// mobile in the proper state to cast. // mobile in the proper state to cast.
if (mob == null) //if (mob == null)
return false; // return false;
if(mob.isPlayerGuard == true){ //if(mob.isPlayerGuard == true){
int contractID; /// int contractID;
if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardMinion)) // if (mob.behaviourType.equals(Enum.MobBehaviourType.GuardMinion))
contractID = mob.guardCaptain.contract.getContractID(); // contractID = mob.guardCaptain.contract.getContractID();
else // else
contractID = mob.contract.getContractID(); // contractID = mob.contract.getContractID();
if(Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false) // if(Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false)
return false; // return false;
} //}
if (mob.mobPowers.isEmpty()) //if (mob.mobPowers.isEmpty())
return false; // return false;
if (!mob.canSee((PlayerCharacter) mob.getCombatTarget())) { //if (!mob.canSee((PlayerCharacter) mob.getCombatTarget())) {
mob.setCombatTarget(null); // mob.setCombatTarget(null);
return false; // return false;
} // }
if (mob.nextCastTime == 0) // if (mob.nextCastTime == 0)
mob.nextCastTime = System.currentTimeMillis(); // mob.nextCastTime = System.currentTimeMillis();
return mob.nextCastTime >= System.currentTimeMillis(); // return mob.nextCastTime >= System.currentTimeMillis();
} catch (Exception e) { //} catch (Exception e) {
Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: canCast" + " " + e.getMessage()); // Logger.info(mob.getObjectUUID() + " " + mob.getName() + " Failed At: canCast" + " " + e.getMessage());
} //}
return false; //return false;
} }
public static boolean MobCast(Mob mob) { public static boolean MobCast(Mob mob) {

Loading…
Cancel
Save