Jump to content

[HELP] Adding .mail command.


Guest khelben

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

×
×
  • 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