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
+6 -2
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());
}
+2
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;
+1 -1
View File
@@ -5891,7 +5891,7 @@ bool Mob::LeaveHealRotationTargetPool()
m_target_of_heal_rotation->RemoveTargetFromPool(this);
m_target_of_heal_rotation.reset();
return !IsHealRotationTarget();
}