diff options
| author | runningnak3d <none@none> | 2008-11-16 02:28:44 -0600 |
|---|---|---|
| committer | runningnak3d <none@none> | 2008-11-16 02:28:44 -0600 |
| commit | 3c866d5529826761c161de7ff9e2e60d5060edb6 (patch) | |
| tree | f342c83c2eac49db074c0c5a9fa8e28dc5f689e9 /src | |
| parent | 44291639b3d89b6fb6d4af027da4cf461fff7230 (diff) | |
[svn] * Fixed a SQL issue that was causing game events to not be saved
* FROM_UNIXTIME doesn't allow '' inside the ()
* This should solve the issue of jumping from phase 1 -> 2 -> 3 -> 4 without completing the objectives
* This should also tick a LOT of players off if their servers are running with the stock TDB blizz values :P (low pop servers at least).
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/BattleGroundMgr.cpp | 4 | ||||
| -rw-r--r-- | src/game/GameEvent.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index d9426240799..6249967bf4c 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1028,7 +1028,7 @@ void BattleGroundMgr::Update(time_t diff) { DistributeArenaPoints(); m_NextAutoDistributionTime = time(NULL) + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS); - CharacterDatabase.PExecute("UPDATE saved_variables SET NextArenaPointDistributionTime = FROM_UNIXTIME('"I64FMTD"')",(uint64)m_NextAutoDistributionTime); + CharacterDatabase.PExecute("UPDATE saved_variables SET NextArenaPointDistributionTime = FROM_UNIXTIME("I64FMTD")",(uint64)m_NextAutoDistributionTime); } m_AutoDistributionTimeChecker = 600000; // check 10 minutes } @@ -1562,7 +1562,7 @@ void BattleGroundMgr::InitAutomaticArenaPointDistribution() { sLog.outDebug("Battleground: Next arena point distribution time not found in SavedVariables, reseting it now."); m_NextAutoDistributionTime = time(NULL) + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS); - CharacterDatabase.PExecute("INSERT INTO saved_variables (NextArenaPointDistributionTime) VALUES ( FROM_UNIXTIME('"I64FMTD"') )",(uint64)m_NextAutoDistributionTime); + CharacterDatabase.PExecute("INSERT INTO saved_variables (NextArenaPointDistributionTime) VALUES ( FROM_UNIXTIME("I64FMTD") )",(uint64)m_NextAutoDistributionTime); } else { diff --git a/src/game/GameEvent.cpp b/src/game/GameEvent.cpp index 6a7ce09a02d..88028290dba 100644 --- a/src/game/GameEvent.cpp +++ b/src/game/GameEvent.cpp @@ -1503,7 +1503,7 @@ void GameEvent::SaveWorldEventStateToDB(uint16 event_id) CharacterDatabase.BeginTransaction(); CharacterDatabase.PExecute("DELETE FROM game_event_save WHERE event_id = '%u'",event_id); if(mGameEvent[event_id].nextstart) - CharacterDatabase.PExecute("INSERT INTO game_event_save (event_id, state, next_start) VALUES ('%u','%u',FROM_UNIXTIME('"I64FMTD"'))",event_id,mGameEvent[event_id].state,mGameEvent[event_id].nextstart); + CharacterDatabase.PExecute("INSERT INTO game_event_save (event_id, state, next_start) VALUES ('%u','%u',FROM_UNIXTIME("I64FMTD"))",event_id,mGameEvent[event_id].state,mGameEvent[event_id].nextstart); else CharacterDatabase.PExecute("INSERT INTO game_event_save (event_id, state, next_start) VALUES ('%u','%u','0000-00-00 00:00:00')",event_id,mGameEvent[event_id].state); CharacterDatabase.CommitTransaction(); |
