mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[8502] Disable quests related to specific game events at startup if event not active.
Also rename member boolean variable. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
bd254e2848
commit
2d5b9c9efb
3 changed files with 8 additions and 5 deletions
|
|
@ -421,7 +421,7 @@ uint32 GameEventMgr::Initialize() // return the next e
|
||||||
m_ActiveEvents.clear();
|
m_ActiveEvents.clear();
|
||||||
uint32 delay = Update();
|
uint32 delay = Update();
|
||||||
sLog.outBasic("Game Event system initialized." );
|
sLog.outBasic("Game Event system initialized." );
|
||||||
isSystemInit = true;
|
m_IsGameEventsInit = true;
|
||||||
return delay;
|
return delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -445,11 +445,14 @@ uint32 GameEventMgr::Update() // return the next e
|
||||||
StopEvent(itr);
|
StopEvent(itr);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!isSystemInit)
|
if (!m_IsGameEventsInit)
|
||||||
{
|
{
|
||||||
int16 event_nid = (-1) * (itr);
|
int16 event_nid = (-1) * (itr);
|
||||||
// spawn all negative ones for this event
|
// spawn all negative ones for this event
|
||||||
GameEventSpawn(event_nid);
|
GameEventSpawn(event_nid);
|
||||||
|
|
||||||
|
// disable any event specific quest (for cases where creature is spawned, but event not active).
|
||||||
|
UpdateEventQuests(itr, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -740,7 +743,7 @@ void GameEventMgr::UpdateEventQuests(uint16 event_id, bool Activate)
|
||||||
|
|
||||||
GameEventMgr::GameEventMgr()
|
GameEventMgr::GameEventMgr()
|
||||||
{
|
{
|
||||||
isSystemInit = false;
|
m_IsGameEventsInit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MANGOS_DLL_SPEC bool IsHolidayActive( HolidayIds id )
|
MANGOS_DLL_SPEC bool IsHolidayActive( HolidayIds id )
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ class GameEventMgr
|
||||||
GameEventIdMap mGameEventPoolIds;
|
GameEventIdMap mGameEventPoolIds;
|
||||||
GameEventDataMap mGameEvent;
|
GameEventDataMap mGameEvent;
|
||||||
ActiveEvents m_ActiveEvents;
|
ActiveEvents m_ActiveEvents;
|
||||||
bool isSystemInit;
|
bool m_IsGameEventsInit;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define gameeventmgr MaNGOS::Singleton<GameEventMgr>::Instance()
|
#define gameeventmgr MaNGOS::Singleton<GameEventMgr>::Instance()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8501"
|
#define REVISION_NR "8502"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue