mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[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:
parent
af50b352b2
commit
a7f784f676
2 changed files with 3 additions and 3 deletions
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10977"
|
||||
#define REVISION_NR "10978"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue