Use GetPlayerGUIDByName in .ticket viewname handler so it returns tickets from offline players too
--HG-- branch : trunk
This commit is contained in:
@@ -60,12 +60,10 @@ GM_Ticket* TicketMgr::GetGMTicketByName(const char* name)
|
||||
if(!normalizePlayerName(pname))
|
||||
return NULL;
|
||||
|
||||
Player *plr = objmgr.GetPlayer(pname.c_str());
|
||||
if(!plr)
|
||||
uint64 playerGuid = objmgr.GetPlayerGUIDByName(pname.c_str());
|
||||
if(!playerGuid)
|
||||
return NULL;
|
||||
|
||||
uint64 playerGuid = plr->GetGUID();
|
||||
|
||||
for(GmTicketList::iterator i = GM_TicketList.begin(); i != GM_TicketList.end();)
|
||||
{
|
||||
if((*i)->playerGuid == playerGuid && (*i)->closed == 0)
|
||||
|
||||
Reference in New Issue
Block a user