Core/Instance: stop updating the instance resettimes based on creature respawns

Port From (https://github.com/TrinityCore/TrinityCore/commit/7dcc185a151745c8a12e23708bb5d457e5796032)
This commit is contained in:
hondacrx
2020-05-12 17:28:03 -04:00
parent a1699494d5
commit c7f160557f
6 changed files with 39 additions and 34 deletions
+1 -1
View File
@@ -1030,7 +1030,7 @@ namespace Game.Entities
byte difficulty = result.Read<byte>(3);
BindExtensionState extendState = (BindExtensionState)result.Read<byte>(4);
long resetTime = result.Read<uint>(5);
long resetTime = result.Read<long>(5);
// the resettime for normal instances is only saved when the InstanceSave is unloaded
// so the value read from the DB may be wrong here but only if the InstanceSave is loaded
// and in that case it is not used
+1 -1
View File
@@ -1609,7 +1609,7 @@ namespace Game.Entities
{
// the reset time is set but not added to the scheduler
// until the players leave the instance
long resettime = creature.GetRespawnTimeEx() + 2 * Time.Hour;
long resettime = GameTime.GetGameTime() + 2 * Time.Hour;
InstanceSave save = Global.InstanceSaveMgr.GetInstanceSave(creature.GetInstanceId());
if (save != null)
if (save.GetResetTime() < resettime)