Skip to content

Commit

Permalink
fix(Core/ThreatMgr): Remove temp threat on resetting threat list (#18162
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Nefertumm authored Jan 13, 2024
1 parent c863a8c commit a1891d8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/server/game/Combat/ThreatMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,12 @@ void ThreatMgr::ResetAllThreat()
if (threatList.empty())
return;

for (ThreatContainer::StorageType::iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
(*itr)->SetThreat(0);
for (HostileReference* ref : threatList)
{
// Reset temp threat before setting threat back to 0.
ref->resetTempThreat();
ref->SetThreat(0.f);
}

setDirty(true);
}

0 comments on commit a1891d8

Please sign in to comment.