mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 15:27:47 -04:00
Core/Instance: stop updating the instance resettimes based on creature respawns
- Rather update normal instance reset time to 2 hours after last creature kill - This fixes yet another integer overflow due to the possibility of having time_t max showing up - Also change respawntime and resettime fields to bigint on respawn/instance related tables - Start using prepared statements on the InstanceSaveMgr
This commit is contained in:
@@ -12132,7 +12132,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
|
||||
{
|
||||
// the reset time is set but not added to the scheduler
|
||||
// until the players leave the instance
|
||||
time_t resettime = creature->GetRespawnTimeEx() + 2 * HOUR;
|
||||
time_t resettime = GameTime::GetGameTime() + 2 * HOUR;
|
||||
if (InstanceSave* save = sInstanceSaveMgr->GetInstanceSave(creature->GetInstanceId()))
|
||||
if (save->GetResetTime() < resettime)
|
||||
save->SetResetTime(resettime);
|
||||
|
||||
Reference in New Issue
Block a user