From f7e997fba1cf8bed2031b9fa8769bd23cbb5d6ba Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 17 Aug 2020 18:04:52 -0400 Subject: [PATCH] Fix NPC AI casting of ST_AEClientV1 As noted, I think we do this check incorrectly, but this should work fine and matches other similar spells, let's get it good enough first. --- zone/mob_ai.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index df4a70e12..994724f0d 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -117,7 +117,8 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates ( (spells[AIspells[i].spellid].targettype == ST_HateList || spells[AIspells[i].spellid].targettype == ST_AETargetHateList) || ( - (spells[AIspells[i].spellid].targettype==ST_AECaster || spells[AIspells[i].spellid].targettype==ST_AEBard) + // note: I think this check is actually wrong and we should be checking range instead in all cases, BUT if range is 0, range check is skipped? Works for now + (spells[AIspells[i].spellid].targettype==ST_AECaster || spells[AIspells[i].spellid].targettype==ST_AEBard || spells[AIspells[i].spellid].targettype==ST_AEClientV1) && dist2 <= spells[AIspells[i].spellid].aoerange*spells[AIspells[i].spellid].aoerange ) || dist2 <= spells[AIspells[i].spellid].range*spells[AIspells[i].spellid].range