mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +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: {
|
case SpellType_Escape: {
|
||||||
// If min_hp !=0 then the spell list has specified
|
// If min_hp !=0 then the spell list has specified
|
||||||
// custom range and we're inside that range if we
|
// custom range and we're inside that range if we
|
||||||
// made it here. The hard coded <=5 is for unspecified.
|
// made it here.
|
||||||
if (GetHPRatio() <= (RuleI(NPC, NPCGatePercent))) {
|
if (AIspells[i].min_hp != 0 || GetHPRatio() <= (RuleI(NPC, NPCGatePercent))) {
|
||||||
auto npcSpawnPoint = CastToNPC()->GetSpawnPoint();
|
auto npcSpawnPoint = CastToNPC()->GetSpawnPoint();
|
||||||
if (!RuleB(NPC, NPCGateNearBind) && DistanceNoZ(m_Position, npcSpawnPoint) < RuleI(NPC, NPCGateDistanceBind)) {
|
if (!RuleB(NPC, NPCGateNearBind) && DistanceNoZ(m_Position, npcSpawnPoint) < RuleI(NPC, NPCGateDistanceBind)) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user