mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-02 15:20:26 +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
-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