From ee5eaab598e445e3926edf6e12b1b2b4477c2594 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Thu, 16 Oct 2014 22:47:02 +0200 Subject: Core/Players: Fix players not being notified if on loading screen Fix packets not being sent to players on loading screen even if the system supports these packets to be queued and sent till the player is in world. There might be additional cases where this applies, please report back if you find any. Fixes #11339 --- src/server/scripts/Commands/cs_group.cpp | 2 +- src/server/scripts/Commands/cs_ticket.cpp | 28 ++++++++++------------------ 2 files changed, 11 insertions(+), 19 deletions(-) (limited to 'src/server/scripts/Commands') diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp index e39aca6f6a7..a558d977b85 100644 --- a/src/server/scripts/Commands/cs_group.cpp +++ b/src/server/scripts/Commands/cs_group.cpp @@ -343,7 +343,7 @@ public: // Check if iterator is online. If is... Player* p = ObjectAccessor::FindPlayer((*itr).guid); - if (p && p->IsInWorld()) + if (p) { // ... than, it prints information like "is online", where he is, etc... onlineState = "online"; diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp index 674658f41ff..23858ce67e6 100644 --- a/src/server/scripts/Commands/cs_ticket.cpp +++ b/src/server/scripts/Commands/cs_ticket.cpp @@ -162,12 +162,9 @@ public: // Inform player, who submitted this ticket, that it is closed if (Player* submitter = ticket->GetPlayer()) { - if (submitter->IsInWorld()) - { - WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4); - data << uint32(GMTICKET_RESPONSE_TICKET_DELETED); - submitter->GetSession()->SendPacket(&data); - } + WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4); + data << uint32(GMTICKET_RESPONSE_TICKET_DELETED); + submitter->GetSession()->SendPacket(&data); } return true; } @@ -232,8 +229,7 @@ public: } if (Player* player = ticket->GetPlayer()) - if (player->IsInWorld()) - ticket->SendResponse(player->GetSession()); + ticket->SendResponse(player->GetSession()); SQLTransaction trans = SQLTransaction(NULL); ticket->SetCompleted(); @@ -273,13 +269,10 @@ public: if (Player* player = ticket->GetPlayer()) { - if (player->IsInWorld()) - { - // Force abandon ticket - WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4); - data << uint32(GMTICKET_RESPONSE_TICKET_DELETED); - player->GetSession()->SendPacket(&data); - } + // Force abandon ticket + WorldPacket data(SMSG_GMTICKET_DELETETICKET, 4); + data << uint32(GMTICKET_RESPONSE_TICKET_DELETED); + player->GetSession()->SendPacket(&data); } return true; @@ -301,8 +294,7 @@ public: ticket->SetEscalatedStatus(TICKET_IN_ESCALATION_QUEUE); if (Player* player = ticket->GetPlayer()) - if (player->IsInWorld()) - sTicketMgr->SendTicket(player->GetSession(), ticket); + sTicketMgr->SendTicket(player->GetSession(), ticket); sTicketMgr->UpdateLastChange(); return true; @@ -372,7 +364,7 @@ public: // Get security level of player, whom this ticket is assigned to uint32 security = SEC_PLAYER; Player* assignedPlayer = ticket->GetAssignedPlayer(); - if (assignedPlayer && assignedPlayer->IsInWorld()) + if (assignedPlayer) security = assignedPlayer->GetSession()->GetSecurity(); else { -- cgit v1.2.3