Jump to content

[HELP] Adding .mail command.


Recommended Posts

Posted

I'm trying to implement a .mail command similar to .bank.

I took a stab at it but being my first exposure to the source I may not have a full understanding of the process.

Here's a Diff to illustrate what i tried.

http://pastebin.com/m3ef08554

The event fires, but the mail screen does not pop up on the client, which leads me to believe I may not have correct call.

Can someone shed some light?

tyvm

Posted

just to clarify, this is for mail, not bank

i saw the interact check and bypassed it, so there shouldn't be that. best thing i can think of is the client needs to initiate the transaction then the server responds.

Posted

It just doesn't make sense though,

Bank:

CMSG_BANKER_ACTIVATE = 0x1B7,

SMSG_SHOW_BANK = 0x1B8,

Mail:

CMSG_GET_MAIL_LIST = 0x23A,

SMSG_MAIL_LIST_RESULT = 0x23B,

Both are initiated client side, why isn't the window opening for the mail?

For those who don't want to look at the diff, I basically addd the custom command for .mail and overloaded the WorldSession::HandleGetMailList to take no parameters and commented out the first 4 lines which involve checking if the client can interact with an object.

This is the function I call from the custom command.

Is there a function I should be calling instead?

Posted

You can try write a function to send this opcode. Like this:

void WorldSession::SendShowBank( uint64 guid )
{
   WorldPacket data( SMSG_SHOW_BANK, 8 );
   data << guid;
   SendPacket( &data );
}

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use