mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10396] Send GMTicket to SendGMTicketGetTicket instead text.
This commit is contained in:
parent
ddfc6386c5
commit
34421e5eb8
5 changed files with 13 additions and 13 deletions
|
|
@ -25,15 +25,15 @@
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "Chat.h"
|
#include "Chat.h"
|
||||||
|
|
||||||
void WorldSession::SendGMTicketGetTicket(uint32 status, char const* text)
|
void WorldSession::SendGMTicketGetTicket(uint32 status, GMTicket *ticket /*= NULL*/)
|
||||||
{
|
{
|
||||||
int len = text ? strlen(text) : 0;
|
int len = ticket ? strlen(ticket->GetText()) : 0;
|
||||||
WorldPacket data( SMSG_GMTICKET_GETTICKET, (4+len+1+4+2+4+4) );
|
WorldPacket data( SMSG_GMTICKET_GETTICKET, (4+len+1+4+2+4+4) );
|
||||||
data << uint32(status); // standard 0x0A, 0x06 if text present
|
data << uint32(status); // standard 0x0A, 0x06 if text present
|
||||||
if(status == 6)
|
if (status == 6)
|
||||||
{
|
{
|
||||||
data << uint32(123); // unk
|
data << uint32(123); // unk
|
||||||
data << text; // ticket text
|
data << (ticket ? ticket->GetText() : ""); // ticket text
|
||||||
data << uint8(0x7); // ticket category
|
data << uint8(0x7); // ticket category
|
||||||
data << float(0); // tickets in queue?
|
data << float(0); // tickets in queue?
|
||||||
data << float(0); // if > "tickets in queue" then "We are currently experiencing a high volume of petitions."
|
data << float(0); // if > "tickets in queue" then "We are currently experiencing a high volume of petitions."
|
||||||
|
|
@ -41,7 +41,7 @@ void WorldSession::SendGMTicketGetTicket(uint32 status, char const* text)
|
||||||
data << uint8(0); // if == 2 and next field == 1 then "Your ticket has been escalated"
|
data << uint8(0); // if == 2 and next field == 1 then "Your ticket has been escalated"
|
||||||
data << uint8(0); // const
|
data << uint8(0); // const
|
||||||
}
|
}
|
||||||
SendPacket( &data );
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendGMResponse(GMTicket *ticket)
|
void WorldSession::SendGMResponse(GMTicket *ticket)
|
||||||
|
|
@ -68,10 +68,10 @@ void WorldSession::HandleGMTicketGetTicketOpcode( WorldPacket & /*recv_data*/ )
|
||||||
if(ticket->HasResponse())
|
if(ticket->HasResponse())
|
||||||
SendGMResponse(ticket);
|
SendGMResponse(ticket);
|
||||||
else
|
else
|
||||||
SendGMTicketGetTicket(0x06, ticket->GetText());
|
SendGMTicketGetTicket(0x06, ticket);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SendGMTicketGetTicket(0x0A, 0);
|
SendGMTicketGetTicket(0x0A);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleGMTicketUpdateTextOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleGMTicketUpdateTextOpcode( WorldPacket & recv_data )
|
||||||
|
|
@ -93,7 +93,7 @@ void WorldSession::HandleGMTicketDeleteTicketOpcode( WorldPacket & /*recv_data*/
|
||||||
data << uint32(9);
|
data << uint32(9);
|
||||||
SendPacket( &data );
|
SendPacket( &data );
|
||||||
|
|
||||||
SendGMTicketGetTicket(0x0A, 0);
|
SendGMTicketGetTicket(0x0A);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleGMTicketCreateOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleGMTicketCreateOpcode( WorldPacket & recv_data )
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ void GMTicketMgr::DeleteAll()
|
||||||
for(GMTicketMap::const_iterator itr = m_GMTicketMap.begin(); itr != m_GMTicketMap.end(); ++itr)
|
for(GMTicketMap::const_iterator itr = m_GMTicketMap.begin(); itr != m_GMTicketMap.end(); ++itr)
|
||||||
{
|
{
|
||||||
if(Player* owner = sObjectMgr.GetPlayer(ObjectGuid(HIGHGUID_PLAYER, itr->first)))
|
if(Player* owner = sObjectMgr.GetPlayer(ObjectGuid(HIGHGUID_PLAYER, itr->first)))
|
||||||
owner->GetSession()->SendGMTicketGetTicket(0x0A, 0);
|
owner->GetSession()->SendGMTicketGetTicket(0x0A);
|
||||||
}
|
}
|
||||||
CharacterDatabase.Execute("DELETE FROM character_ticket");
|
CharacterDatabase.Execute("DELETE FROM character_ticket");
|
||||||
m_GMTicketListByCreatingOrder.clear();
|
m_GMTicketListByCreatingOrder.clear();
|
||||||
|
|
|
||||||
|
|
@ -2789,7 +2789,7 @@ bool ChatHandler::HandleDelTicketCommand(char *args)
|
||||||
//notify player
|
//notify player
|
||||||
if (Player* pl = sObjectMgr.GetPlayer(ObjectGuid(HIGHGUID_PLAYER, lowguid)))
|
if (Player* pl = sObjectMgr.GetPlayer(ObjectGuid(HIGHGUID_PLAYER, lowguid)))
|
||||||
{
|
{
|
||||||
pl->GetSession()->SendGMTicketGetTicket(0x0A, 0);
|
pl->GetSession()->SendGMTicketGetTicket(0x0A);
|
||||||
PSendSysMessage(LANG_COMMAND_TICKETPLAYERDEL, GetNameLink(pl).c_str());
|
PSendSysMessage(LANG_COMMAND_TICKETPLAYERDEL, GetNameLink(pl).c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2809,7 +2809,7 @@ bool ChatHandler::HandleDelTicketCommand(char *args)
|
||||||
|
|
||||||
// notify players about ticket deleting
|
// notify players about ticket deleting
|
||||||
if (target)
|
if (target)
|
||||||
target->GetSession()->SendGMTicketGetTicket(0x0A, 0);
|
target->GetSession()->SendGMTicketGetTicket(0x0A);
|
||||||
|
|
||||||
std::string nameLink = playerLink(target_name);
|
std::string nameLink = playerLink(target_name);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ class MANGOS_DLL_SPEC WorldSession
|
||||||
void SendTabardVendorActivate( uint64 guid );
|
void SendTabardVendorActivate( uint64 guid );
|
||||||
void SendSpiritResurrect();
|
void SendSpiritResurrect();
|
||||||
void SendBindPoint(Creature* npc);
|
void SendBindPoint(Creature* npc);
|
||||||
void SendGMTicketGetTicket(uint32 status, char const* text);
|
void SendGMTicketGetTicket(uint32 status, GMTicket *ticket = NULL);
|
||||||
void SendGMResponse(GMTicket *ticket);
|
void SendGMResponse(GMTicket *ticket);
|
||||||
|
|
||||||
void SendAttackStop(Unit const* enemy);
|
void SendAttackStop(Unit const* enemy);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10395"
|
#define REVISION_NR "10396"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue