Returned Logic from PR #766

This commit is contained in:
Trust 2018-08-25 19:46:37 -04:00
parent 4c8018e4ca
commit 62f9816aa8

View File

@ -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;