× New Paste
Welcome to Amin Mahmoudi official website.
Last Blog Posts :
How to connect PHP to Microsoft SQL Server Our Private World of Warcraft Fun 3.3.5a Server Started Install GCC7 in CentOS & Ubuntu Use Telegram bot to get notifications about your MasterkinG account Unveiling new version of MasterkinG32 website 
Main Menu
User Panel
  Amin Mahmoudi - 2018/11/19 19:42 - Views : 124 -  C++  -  Clone  -  RAW  -  Download  -  
// In file Mailhandler.cpp change CanOpenMailBox function to this :
bool WorldSession::CanOpenMailBox(uint64 guid)
{
    if (guid == _player->GetGUID())
    {
        //sLog->outError("%s attempt open mailbox in cheating way.", _player->GetName().c_str());
        return true;
    }
    else if (IS_ITEM_GUID(guid))
    {
        return true;
    }
    else if (IS_GAMEOBJECT_GUID(guid))
    {
        if (!_player->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_MAILBOX))
            return false;
    }
    else if (IS_CRE_OR_VEH_OR_PET_GUID(guid))
    {
        if (!_player->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_MAILBOX))
            return false;
    }
    else
        return false;

    return true;
}