mangosR2/mangos — comment on commit 33bd2f835adf56c5fbb332979938e85440f0eba4
File:  line 0
By Reamer:

maybe double code, plz check:

CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty = '%u'", (uint64)next_reset, mapid, difficulty);

in line 972 MapPersistentStateMgr.cpp
and

CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty = '%u'", (uint64)next_reset, uint32(event.mapid), uint32(event.difficulty));

in line 972 MapPersistentStateMgr.cpp

plz check the logic:
Update()->
event.type == RESET_EVENT_INFORM_LAST!!
_ResetOrWarnAll(...)
now the first query^^
and after this the second query