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

Loading…
Cancel
Save