mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Returned Logic from PR #766
This commit is contained in:
parent
4c8018e4ca
commit
62f9816aa8
@ -200,8 +200,8 @@ bool NPC::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes, bool bInnates
|
||||
case SpellType_Escape: {
|
||||
// If min_hp !=0 then the spell list has specified
|
||||
// custom range and we're inside that range if we
|
||||
// made it here. The hard coded <=5 is for unspecified.
|
||||
if (GetHPRatio() <= (RuleI(NPC, NPCGatePercent))) {
|
||||
// made it here.
|
||||
if (AIspells[i].min_hp != 0 || GetHPRatio() <= (RuleI(NPC, NPCGatePercent))) {
|
||||
auto npcSpawnPoint = CastToNPC()->GetSpawnPoint();
|
||||
if (!RuleB(NPC, NPCGateNearBind) && DistanceNoZ(m_Position, npcSpawnPoint) < RuleI(NPC, NPCGateDistanceBind)) {
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user