mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[8794] Also rename gameeventmgr to sGameEventMgr.
Hopefully last singleton rename. :)
This commit is contained in:
parent
b3f3ffa885
commit
3c1aef871a
6 changed files with 23 additions and 23 deletions
|
|
@ -750,8 +750,8 @@ GameEventMgr::GameEventMgr()
|
|||
|
||||
MANGOS_DLL_SPEC bool IsHolidayActive( HolidayIds id )
|
||||
{
|
||||
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
|
||||
GameEventMgr::ActiveEvents const& ae = gameeventmgr.GetActiveEventList();
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
|
||||
GameEventMgr::ActiveEvents const& ae = sGameEventMgr.GetActiveEventList();
|
||||
|
||||
for(GameEventMgr::ActiveEvents::const_iterator itr = ae.begin(); itr != ae.end(); ++itr)
|
||||
if(events[*itr].holiday_id==id)
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class GameEventMgr
|
|||
bool m_IsGameEventsInit;
|
||||
};
|
||||
|
||||
#define gameeventmgr MaNGOS::Singleton<GameEventMgr>::Instance()
|
||||
#define sGameEventMgr MaNGOS::Singleton<GameEventMgr>::Instance()
|
||||
|
||||
MANGOS_DLL_SPEC bool IsHolidayActive(HolidayIds id);
|
||||
|
||||
|
|
|
|||
|
|
@ -398,7 +398,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args)
|
|||
{
|
||||
Player* pl = m_session->GetPlayer();
|
||||
QueryResult *result;
|
||||
GameEventMgr::ActiveEvents const& activeEventsList = gameeventmgr.GetActiveEventList();
|
||||
GameEventMgr::ActiveEvents const& activeEventsList = sGameEventMgr.GetActiveEventList();
|
||||
if(*args)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r
|
||||
|
|
@ -3687,8 +3687,8 @@ bool ChatHandler::HandleLookupEventCommand(const char* args)
|
|||
|
||||
uint32 counter = 0;
|
||||
|
||||
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
|
||||
GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
|
||||
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
|
||||
|
||||
for(uint32 id = 0; id < events.size(); ++id )
|
||||
{
|
||||
|
|
@ -3725,8 +3725,8 @@ bool ChatHandler::HandleEventListCommand(const char* args)
|
|||
if (arg == "all")
|
||||
all = true;
|
||||
|
||||
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
|
||||
GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
|
||||
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
|
||||
|
||||
char const* active = GetMangosString(LANG_ACTIVE);
|
||||
char const* inactive = GetMangosString(LANG_FACTION_INACTIVE);
|
||||
|
|
@ -3771,7 +3771,7 @@ bool ChatHandler::HandleEventInfoCommand(const char* args)
|
|||
|
||||
uint32 event_id = atoi(cId);
|
||||
|
||||
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
|
||||
|
||||
if(event_id >=events.size())
|
||||
{
|
||||
|
|
@ -3788,14 +3788,14 @@ bool ChatHandler::HandleEventInfoCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
|
||||
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
|
||||
bool active = activeEvents.find(event_id) != activeEvents.end();
|
||||
char const* activeStr = active ? GetMangosString(LANG_ACTIVE) : "";
|
||||
|
||||
std::string startTimeStr = TimeToTimestampStr(eventData.start);
|
||||
std::string endTimeStr = TimeToTimestampStr(eventData.end);
|
||||
|
||||
uint32 delay = gameeventmgr.NextCheck(event_id);
|
||||
uint32 delay = sGameEventMgr.NextCheck(event_id);
|
||||
time_t nextTime = time(NULL)+delay;
|
||||
std::string nextStr = nextTime >= eventData.start && nextTime < eventData.end ? TimeToTimestampStr(time(NULL)+delay) : "-";
|
||||
|
||||
|
|
@ -3820,7 +3820,7 @@ bool ChatHandler::HandleEventStartCommand(const char* args)
|
|||
|
||||
int32 event_id = atoi(cId);
|
||||
|
||||
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
|
||||
|
||||
if(event_id < 1 || event_id >=events.size())
|
||||
{
|
||||
|
|
@ -3837,7 +3837,7 @@ bool ChatHandler::HandleEventStartCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
|
||||
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
|
||||
if(activeEvents.find(event_id) != activeEvents.end())
|
||||
{
|
||||
PSendSysMessage(LANG_EVENT_ALREADY_ACTIVE,event_id);
|
||||
|
|
@ -3846,7 +3846,7 @@ bool ChatHandler::HandleEventStartCommand(const char* args)
|
|||
}
|
||||
|
||||
PSendSysMessage(LANG_EVENT_STARTED, event_id, eventData.description.c_str());
|
||||
gameeventmgr.StartEvent(event_id,true);
|
||||
sGameEventMgr.StartEvent(event_id,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -3862,7 +3862,7 @@ bool ChatHandler::HandleEventStopCommand(const char* args)
|
|||
|
||||
int32 event_id = atoi(cId);
|
||||
|
||||
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
|
||||
|
||||
if(event_id < 1 || event_id >=events.size())
|
||||
{
|
||||
|
|
@ -3879,7 +3879,7 @@ bool ChatHandler::HandleEventStopCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
GameEventMgr::ActiveEvents const& activeEvents = gameeventmgr.GetActiveEventList();
|
||||
GameEventMgr::ActiveEvents const& activeEvents = sGameEventMgr.GetActiveEventList();
|
||||
|
||||
if(activeEvents.find(event_id) == activeEvents.end())
|
||||
{
|
||||
|
|
@ -3889,7 +3889,7 @@ bool ChatHandler::HandleEventStopCommand(const char* args)
|
|||
}
|
||||
|
||||
PSendSysMessage(LANG_EVENT_STOPPED, event_id, eventData.description.c_str());
|
||||
gameeventmgr.StopEvent(event_id,true);
|
||||
sGameEventMgr.StopEvent(event_id,true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7246,7 +7246,7 @@ bool PlayerCondition::Meets(Player const * player) const
|
|||
case CONDITION_NO_AURA:
|
||||
return !player->HasAura(value1, value2);
|
||||
case CONDITION_ACTIVE_EVENT:
|
||||
return gameeventmgr.IsActiveEvent(value1);
|
||||
return sGameEventMgr.IsActiveEvent(value1);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -7383,7 +7383,7 @@ bool PlayerCondition::IsValid(ConditionType condition, uint32 value1, uint32 val
|
|||
}
|
||||
case CONDITION_ACTIVE_EVENT:
|
||||
{
|
||||
GameEventMgr::GameEventDataMap const& events = gameeventmgr.GetEventMap();
|
||||
GameEventMgr::GameEventDataMap const& events = sGameEventMgr.GetEventMap();
|
||||
if(value1 >=events.size() || !events[value1].isValid())
|
||||
{
|
||||
sLog.outErrorDb("Active event condition requires existed event id (%u), skipped", value1);
|
||||
|
|
|
|||
|
|
@ -1274,7 +1274,7 @@ void World::SetInitialWorldSettings()
|
|||
|
||||
sLog.outString( "Loading Game Event Data...");
|
||||
sLog.outString();
|
||||
gameeventmgr.LoadFromDB();
|
||||
sGameEventMgr.LoadFromDB();
|
||||
sLog.outString( ">>> Game Event Data loaded" );
|
||||
sLog.outString();
|
||||
|
||||
|
|
@ -1510,7 +1510,7 @@ void World::SetInitialWorldSettings()
|
|||
sPoolMgr.Initialize();
|
||||
|
||||
sLog.outString("Starting Game Event system..." );
|
||||
uint32 nextGameEvent = gameeventmgr.Initialize();
|
||||
uint32 nextGameEvent = sGameEventMgr.Initialize();
|
||||
m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent); //depend on next event
|
||||
|
||||
sLog.outString( "WORLD: World initialized" );
|
||||
|
|
@ -1663,7 +1663,7 @@ void World::Update(uint32 diff)
|
|||
if (m_timers[WUPDATE_EVENTS].Passed())
|
||||
{
|
||||
m_timers[WUPDATE_EVENTS].Reset(); // to give time for Update() to be processed
|
||||
uint32 nextGameEvent = gameeventmgr.Update();
|
||||
uint32 nextGameEvent = sGameEventMgr.Update();
|
||||
m_timers[WUPDATE_EVENTS].SetInterval(nextGameEvent);
|
||||
m_timers[WUPDATE_EVENTS].Reset();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8793"
|
||||
#define REVISION_NR "8794"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue