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
This commit is contained in:
jackpoz committed 2014-10-17 22:35:28 +02:00
1 parent c5ef82cc48
commit ee5eaab598
33 files changed
+119 -120

No files matched your search

+10 -18
View File
@@ -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
{