mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-23 20:58:21 +00:00
[Code] WorldEventScheduler and ZoneEventScheduler Global to Singleton Cleanup
This commit is contained in:
+1
-2
@@ -95,7 +95,6 @@ ClientList client_list;
|
||||
GroupLFPList LFPGroupList;
|
||||
ZSList zoneserver_list;
|
||||
LauncherList launcher_list;
|
||||
WorldEventScheduler event_scheduler;
|
||||
volatile bool RunLoops = true;
|
||||
uint32 numclients = 0;
|
||||
uint32 numzones = 0;
|
||||
@@ -418,7 +417,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
event_scheduler.Process(&zoneserver_list);
|
||||
WorldEventScheduler::Instance()->Process(&zoneserver_list);
|
||||
|
||||
client_list.Process();
|
||||
guild_mgr.Process();
|
||||
|
||||
@@ -224,8 +224,6 @@ void WorldBoot::RegisterLoginservers()
|
||||
}
|
||||
}
|
||||
|
||||
extern WorldEventScheduler event_scheduler;
|
||||
|
||||
bool WorldBoot::DatabaseLoadRoutines(int argc, char **argv)
|
||||
{
|
||||
// logging system init
|
||||
@@ -389,7 +387,7 @@ bool WorldBoot::DatabaseLoadRoutines(int argc, char **argv)
|
||||
content_db.LoadCharacterCreateCombos();
|
||||
|
||||
LogInfo("Initializing [EventScheduler]");
|
||||
event_scheduler.SetDatabase(&database)->LoadScheduledEvents();
|
||||
WorldEventScheduler::Instance()->SetDatabase(&database)->LoadScheduledEvents();
|
||||
|
||||
LogInfo("Initializing [WorldContentService]");
|
||||
content_service.SetDatabase(&database)
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
class WorldEventScheduler : public ServerEventScheduler {
|
||||
public:
|
||||
void Process(ZSList *zs_list);
|
||||
|
||||
static WorldEventScheduler* Instance()
|
||||
{
|
||||
static WorldEventScheduler instance;
|
||||
return &instance;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //EQEMU_EVENT_SCHEDULER_H
|
||||
|
||||
Reference in New Issue
Block a user