mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 10:50:24 +00:00
Fix /camp rest timer exploit
This commit is contained in:
@@ -1933,12 +1933,11 @@ void Client::DoEnduranceUpkeep() {
|
||||
SetEndurUpkeep(false);
|
||||
}
|
||||
|
||||
void Client::CalcRestState() {
|
||||
|
||||
void Client::CalcRestState()
|
||||
{
|
||||
// This method calculates rest state HP and mana regeneration.
|
||||
// The client must have been out of combat for RuleI(Character, RestRegenTimeToActivate) seconds,
|
||||
// must be sitting down, and must not have any detrimental spells affecting them.
|
||||
//
|
||||
if(!RuleB(Character, RestRegenEnabled))
|
||||
return;
|
||||
|
||||
@@ -1950,6 +1949,9 @@ void Client::CalcRestState() {
|
||||
if(!rest_timer.Check(false))
|
||||
return;
|
||||
|
||||
// so we don't have aggro, our timer has expired, we do not want this to cause issues
|
||||
m_pp.RestTimer = 0;
|
||||
|
||||
uint32 buff_count = GetMaxTotalSlots();
|
||||
for (unsigned int j = 0; j < buff_count; j++) {
|
||||
if(buffs[j].spellid != SPELL_UNKNOWN) {
|
||||
@@ -1960,7 +1962,6 @@ void Client::CalcRestState() {
|
||||
}
|
||||
|
||||
ooc_regen = true;
|
||||
|
||||
}
|
||||
|
||||
void Client::DoTracking()
|
||||
|
||||
Reference in New Issue
Block a user