Mob Casting bypasses mele range check
This commit is contained in:
@@ -36,17 +36,17 @@ public class MobileFSM {
|
|||||||
mob.setCombatTarget(null);
|
mob.setCombatTarget(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(target.getObjectType() == Enum.GameObjectType.PlayerCharacter && canCast(mob)){
|
||||||
|
if(MobCast(mob)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!CombatUtilities.inRangeToAttack(mob, target))
|
if (!CombatUtilities.inRangeToAttack(mob, target))
|
||||||
return;
|
return;
|
||||||
switch (target.getObjectType()) {
|
switch (target.getObjectType()) {
|
||||||
case PlayerCharacter:
|
case PlayerCharacter:
|
||||||
PlayerCharacter targetPlayer = (PlayerCharacter) target;
|
PlayerCharacter targetPlayer = (PlayerCharacter) target;
|
||||||
if (canCast(mob)) {
|
AttackPlayer(mob, targetPlayer);
|
||||||
if (!MobCast(mob))
|
|
||||||
AttackPlayer(mob, targetPlayer);
|
|
||||||
} else {
|
|
||||||
AttackPlayer(mob, targetPlayer);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case Building:
|
case Building:
|
||||||
Building targetBuilding = (Building) target;
|
Building targetBuilding = (Building) target;
|
||||||
|
|||||||
Reference in New Issue
Block a user