mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 17:58:20 +00:00
Add RangedAttackImmunity checks before trying to ranged attack
This commit is contained in:
+2
-2
@@ -2213,7 +2213,7 @@ void Bot::AI_Process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (atCombatRange) {
|
if (atCombatRange) {
|
||||||
if (RuleB(Bots, AllowRangedPulling) && IsBotRanged() && ranged_timer.Check(false)) {
|
if (!tar->GetSpecialAbility(SpecialAbility::RangedAttackImmunity) && RuleB(Bots, AllowRangedPulling) && IsBotRanged() && ranged_timer.Check(false)) {
|
||||||
StopMoving(CalculateHeadingToTarget(tar->GetX(), tar->GetY()));
|
StopMoving(CalculateHeadingToTarget(tar->GetX(), tar->GetY()));
|
||||||
|
|
||||||
if (BotRangedAttack(tar) && CheckDoubleRangedAttack()) {
|
if (BotRangedAttack(tar) && CheckDoubleRangedAttack()) {
|
||||||
@@ -2290,7 +2290,7 @@ void Bot::AI_Process()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsBotRanged() && ranged_timer.Check(false)) {
|
if (!tar->GetSpecialAbility(SpecialAbility::RangedAttackImmunity) && IsBotRanged() && ranged_timer.Check(false)) {
|
||||||
if (BotRangedAttack(tar) && CheckDoubleRangedAttack()) {
|
if (BotRangedAttack(tar) && CheckDoubleRangedAttack()) {
|
||||||
BotRangedAttack(tar, true);
|
BotRangedAttack(tar, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user