[11123] Move respawn data to InstanceSave.

This make prev commit more useful.
In future InstanceSave also planned store local pools state.
This commit is contained in:
VladimirMangos 2011-02-08 06:30:44 +03:00
parent 852c4ddf32
commit 6cfa64db97
13 changed files with 258 additions and 191 deletions

View file

@ -882,9 +882,8 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
// the reset time is set but not added to the scheduler
// until the players leave the instance
time_t resettime = cVictim->GetRespawnTimeEx() + 2 * HOUR;
if (InstanceSave *save = m->GetInstanceSave())
if (save->GetResetTime() < resettime)
save->SetResetTime(resettime);
if (m->GetInstanceSave()->GetResetTime() < resettime)
m->GetInstanceSave()->SetResetTime(resettime);
}
}
}