forked from MagicBane/Server
mele guards dont cast
This commit is contained in:
@@ -2679,6 +2679,9 @@ public class Enum {
|
|||||||
return race;
|
return race;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean isMage(){
|
||||||
|
return this.minionClass.ordinal() == MinionClass.MAGE.ordinal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum GridObjectType {
|
public enum GridObjectType {
|
||||||
|
|||||||
@@ -320,6 +320,18 @@ public class MobAI {
|
|||||||
if (mob == null)
|
if (mob == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if(mob.isPlayerGuard == true){
|
||||||
|
int contractID;
|
||||||
|
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){
|
||||||
|
contractID = mob.npcOwner.contract.getContractID();
|
||||||
|
} else{
|
||||||
|
contractID = mob.contract.getContractID();
|
||||||
|
}
|
||||||
|
if(Enum.MinionType.ContractToMinionMap.get(contractID).isMage() == false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mob.mobPowers.isEmpty())
|
if (mob.mobPowers.isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -327,12 +339,6 @@ public class MobAI {
|
|||||||
mob.setCombatTarget(null);
|
mob.setCombatTarget(null);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//int castRoll = ThreadLocalRandom.current().nextInt(1,101);
|
|
||||||
|
|
||||||
//if (castRoll < MobAIThread.AI_POWER_DIVISOR)
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
if (mob.nextCastTime == 0)
|
if (mob.nextCastTime == 0)
|
||||||
mob.nextCastTime = System.currentTimeMillis();
|
mob.nextCastTime = System.currentTimeMillis();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user