mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
Skip distance check in mob spell AI for some target types
This should be good enough for now, some of the hatelist spells use 0 ranges for some reason :P The client checks only a few target types for distance, we should probably just match that eventually
This commit is contained in:
parent
13ad5e4b46
commit
03dbe47546
@ -98,8 +98,12 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates
|
|||||||
mana_cost = spells[AIspells[i].spellid].mana;
|
mana_cost = spells[AIspells[i].spellid].mana;
|
||||||
else if (mana_cost == -2)
|
else if (mana_cost == -2)
|
||||||
mana_cost = 0;
|
mana_cost = 0;
|
||||||
|
// this is ugly -- ignore distance for hatelist spells, looks like the client is only checking distance for some targettypes in CastSpell,
|
||||||
|
// should probably match that eventually. This should be good enough for now I guess ....
|
||||||
if (
|
if (
|
||||||
((
|
(
|
||||||
|
(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)
|
(spells[AIspells[i].spellid].targettype==ST_AECaster || spells[AIspells[i].spellid].targettype==ST_AEBard)
|
||||||
&& dist2 <= spells[AIspells[i].spellid].aoerange*spells[AIspells[i].spellid].aoerange
|
&& dist2 <= spells[AIspells[i].spellid].aoerange*spells[AIspells[i].spellid].aoerange
|
||||||
) ||
|
) ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user