diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-10-16 22:47:02 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-10-17 22:35:28 +0200 |
| commit | ee5eaab598e445e3926edf6e12b1b2b4477c2594 (patch) | |
| tree | 4a108f6c1d0bf904d19adba49a0a04496c1c4294 /src/server/scripts | |
| parent | c5ef82cc4834811c6361f81b37d635cc20712f7a (diff) | |
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
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_group.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_ticket.cpp | 28 |
2 files changed, 11 insertions, 19 deletions
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 { |
