fix(Core/Battlegrounds): Delay a little bit relocation of dead players. (#9302)

Fixes #8958
This commit is contained in:
UltraNix
2021-12-08 22:10:26 +01:00
committed by GitHub
parent 6c1846ad8f
commit 85abfafb2b
6 changed files with 84 additions and 43 deletions

View File

@@ -204,6 +204,8 @@ Battleground::Battleground()
Battleground::~Battleground()
{
_reviveEvents.KillAllEvents(false);
// remove objects and creatures
// (this is done automatically in mapmanager update, when the instance is reset after the reset time)
uint32 size = uint32(BgCreatures.size());
@@ -325,6 +327,9 @@ inline void Battleground::_ProcessResurrect(uint32 diff)
// *** BATTLEGROUND RESURRECTION SYSTEM ***
// *********************************************************
// this should be handled by spell system
_reviveEvents.Update(diff);
m_LastResurrectTime += diff;
if (m_LastResurrectTime >= RESURRECTION_INTERVAL)
{