I've been toying with this for a friend and I think that the following will work
Remove anything that says this in MailHandler.cpp:
And use this as your command script:
I haven't tested ingame because my database is a little bit retarded at the moment, if someone could that would be fantastic. Then this might count as a release. If someone knows this won't work / I get around to testing and it turns out to be useless (I think it might be a bit too easy to be true) then I guess it's back to square one and getting around trinitys dastardly blizzlike-ness.
Remove anything that says this in MailHandler.cpp:
Code:
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
return;
And use this as your command script:
Code:
#include "ScriptPCH.h"
#include "Chat.h"
#include "Language.h"
class mail_command : public CommandScript
{
public:
mail_command() : CommandScript("mail_command") { }
static bool HandleMailCommand(ChatHandler* handler, const char* /*args*/)
{
Player* player = handler->GetSession()->GetPlayer();
WorldPacket data(SMSG_SHOW_MAILBOX, 8);
data << uint64(player->GetGUID());
player->GetSession()->HandleGetMailList(data);
return true;
}
ChatCommand* GetCommands() const
{
static ChatCommand mail_command[] =
{
{ "mail", SEC_PLAYER, false, &HandleMailCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
return mail_command;
}
};
void AddSC_mail_command()
{
new mail_command();
}
I haven't tested ingame because my database is a little bit retarded at the moment, if someone could that would be fantastic. Then this might count as a release. If someone knows this won't work / I get around to testing and it turns out to be useless (I think it might be a bit too easy to be true) then I guess it's back to square one and getting around trinitys dastardly blizzlike-ness.