[10978] Use PExecute instead PQuery for geme event status updates

This also must fix unexpected duplucate record errrors at server startup
This commit is contained in:
VladimirMangos 2011-01-07 06:47:51 +03:00
parent af50b352b2
commit a7f784f676
2 changed files with 3 additions and 3 deletions

View file

@ -633,7 +633,7 @@ uint32 GameEventMgr::Update(ActiveEvents const* activeAtShutdown /*= NULL*/)
void GameEventMgr::UnApplyEvent(uint16 event_id)
{
m_ActiveEvents.erase(event_id);
CharacterDatabase.PQuery("DELETE FROM game_event_status WHERE event = %u", event_id);
CharacterDatabase.PExecute("DELETE FROM game_event_status WHERE event = %u", event_id);
sLog.outString("GameEvent %u \"%s\" removed.", event_id, mGameEvent[event_id].description.c_str());
// un-spawn positive event tagged objects
@ -652,7 +652,7 @@ void GameEventMgr::UnApplyEvent(uint16 event_id)
void GameEventMgr::ApplyNewEvent(uint16 event_id, bool resume)
{
m_ActiveEvents.insert(event_id);
CharacterDatabase.PQuery("INSERT INTO game_event_status (event) VALUES (%u)", event_id);
CharacterDatabase.PExecute("INSERT INTO game_event_status (event) VALUES (%u)", event_id);
if (sWorld.getConfig(CONFIG_BOOL_EVENT_ANNOUNCE))
sWorld.SendWorldText(LANG_EVENTMESSAGE, mGameEvent[event_id].description.c_str());

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10977"
#define REVISION_NR "10978"
#endif // __REVISION_NR_H__