Fix for heal rotation 'Stack Overflow' error

This commit is contained in:
Uleat 2016-03-25 02:04:25 -04:00
parent 3b6889d5d3
commit 817d8ceb64
4 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 03/25/2016 ==
Uleat: Fix for heal rotation 'Stack Overflow' error
== 03/24/2016 ==
Kayen: Fix for AE taunt to use correct range and hate modifier.
Fix for spell effect version of taunt to use correct range.

View File

@ -47,6 +47,8 @@ HealRotation::HealRotation(Bot* hr_creator, uint32 interval_ms, bool fast_heals,
ResetArmorTypeHPLimits();
m_is_active = false;
m_consumed = false;
}
void HealRotation::SetIntervalMS(uint32 interval_ms)
@ -502,8 +504,10 @@ bool HealRotation::valid_state()
cycle_refresh();
if (m_member_pool.empty())
ClearTargetPool(); // Consumes HealRotation at this point
if (m_member_pool.empty() && !m_consumed) { // Consumes HealRotation at this point
m_consumed = true;
ClearTargetPool();
}
return (!m_member_pool.empty());
}

View File

@ -127,6 +127,8 @@ private:
bool m_is_active;
bool m_consumed;
std::list<Bot*> m_member_pool;
std::list<Bot*> m_cycle_pool;
std::list<Mob*> m_target_pool;

View File

@ -5891,7 +5891,7 @@ bool Mob::LeaveHealRotationTargetPool()
m_target_of_heal_rotation->RemoveTargetFromPool(this);
m_target_of_heal_rotation.reset();
return !IsHealRotationTarget();
}