Skip to content

Commit

Permalink
[10549] At schedule second reset update real reset time.
Browse files Browse the repository at this point in the history
Missing part of prev. related commit.

Also without this code at second reset after restart server will go to infinity loop.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
Funkybit authored and VladimirMangos committed Sep 26, 2010
1 parent e528090 commit 9782d22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/game/InstanceSaveMgr.cpp
Expand Up @@ -345,6 +345,10 @@ void InstanceResetScheduler::Update()

time_t next_reset = InstanceResetScheduler::CalculateNextResetTime(mapDiff, resetTime);

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

SetResetTimeFor(event.mapid, event.difficulty, next_reset);

ResetEventType type = RESET_EVENT_INFORM_1;
for (; type < RESET_EVENT_INFORM_LAST; type = ResetEventType(type+1))
if (next_reset - resetEventTypeDelay[type] > now)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10548"
#define REVISION_NR "10549"
#endif // __REVISION_NR_H__

0 comments on commit 9782d22

Please sign in to comment.