mirror of
https://github.com/EQEmu/Server.git
synced 2026-11-23 12:57:16 +00:00
[Code] TaskManager Global to Singleton Cleanup (#4945)
* [Code] TaskManager Global to Singleton Cleanup * Remove checks for existence * Final
This commit is contained in:
1 parent
f8ee664b27
commit
940f97c9ae
14 files changed
+94
-117
No files matched your search
+1
-8
@@ -4175,10 +4175,6 @@ void EntityList::ProcessProximitySay(const char *message, Client *c, uint8 langu
|
||||
|
||||
void EntityList::SaveAllClientsTaskState()
|
||||
{
|
||||
if (!task_manager) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto it = client_list.begin();
|
||||
while (it != client_list.end()) {
|
||||
Client *client = it->second;
|
||||
@@ -4192,9 +4188,6 @@ void EntityList::SaveAllClientsTaskState()
|
||||
|
||||
void EntityList::ReloadAllClientsTaskState(int task_id)
|
||||
{
|
||||
if (!task_manager)
|
||||
return;
|
||||
|
||||
auto it = client_list.begin();
|
||||
while (it != client_list.end()) {
|
||||
Client *client = it->second;
|
||||
@@ -4205,7 +4198,7 @@ void EntityList::ReloadAllClientsTaskState(int task_id)
|
||||
Log(Logs::General, Logs::Tasks, "[CLIENTLOAD] Reloading Task State For Client %s", client->GetName());
|
||||
client->RemoveClientTaskState();
|
||||
client->LoadClientTaskState();
|
||||
task_manager->SendActiveTasksToClient(client);
|
||||
TaskManager::Instance()->SendActiveTasksToClient(client);
|
||||
}
|
||||
}
|
||||
++it;
|
||||
|
||||
Reference in new issue
Block a user