Changeset 242 for trunk

Show
Ignore:
Timestamp:
11/19/08 13:49:57 (17 years ago)
Author:
yumileroy
Message:

[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).

Original author: runningnak3d
Date: 2008-11-16 02:28:44-06:00

Location:
trunk/src/game
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/BattleGroundMgr.cpp

    r230 r242  
    10291029                DistributeArenaPoints(); 
    10301030                m_NextAutoDistributionTime = time(NULL) + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS); 
    1031                 CharacterDatabase.PExecute("UPDATE saved_variables SET NextArenaPointDistributionTime = FROM_UNIXTIME('"I64FMTD"')",(uint64)m_NextAutoDistributionTime); 
     1031                CharacterDatabase.PExecute("UPDATE saved_variables SET NextArenaPointDistributionTime = FROM_UNIXTIME("I64FMTD")",(uint64)m_NextAutoDistributionTime); 
    10321032            } 
    10331033            m_AutoDistributionTimeChecker = 600000; // check 10 minutes 
     
    15631563            sLog.outDebug("Battleground: Next arena point distribution time not found in SavedVariables, reseting it now.");  
    15641564            m_NextAutoDistributionTime = time(NULL) + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS); 
    1565             CharacterDatabase.PExecute("INSERT INTO saved_variables (NextArenaPointDistributionTime) VALUES ( FROM_UNIXTIME('"I64FMTD"') )",(uint64)m_NextAutoDistributionTime); 
     1565            CharacterDatabase.PExecute("INSERT INTO saved_variables (NextArenaPointDistributionTime) VALUES ( FROM_UNIXTIME("I64FMTD") )",(uint64)m_NextAutoDistributionTime); 
    15661566        } 
    15671567        else 
  • trunk/src/game/GameEvent.cpp

    r186 r242  
    15041504    CharacterDatabase.PExecute("DELETE FROM game_event_save WHERE event_id = '%u'",event_id); 
    15051505    if(mGameEvent[event_id].nextstart) 
    1506         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); 
     1506        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); 
    15071507    else 
    15081508        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);