Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShowMailBox is empty #425

Closed
ataraxyaffliction opened this issue Jul 22, 2022 · 5 comments
Closed

ShowMailBox is empty #425

ataraxyaffliction opened this issue Jul 22, 2022 · 5 comments

Comments

@ataraxyaffliction
Copy link

ataraxyaffliction commented Jul 22, 2022

Calling ShowMainBox opens an empty mail window. But if you open mail through a mailbox or GM command, and call ShowMailBox, then the mail will be displayed.
I can’t understand what exactly is the problem, because the implementation of the request is essentially the same as that of GM command. Trinity core.

@Rochet2
Copy link
Member

Rochet2 commented Jul 22, 2022

What is the guid you pass into ShowMailBox?
The guid is supposed to be a valid mailbox guid. Otherwise it will not work - except if you are a GM.
It seems that if you use creature guid it needs to have npcflag 0x04000000 set.
The requirements vary by core,

I think this code nicely outlines the main restrictions: https://github.com/TrinityCore/TrinityCore/blob/53cc21b1b45e11ba9358df3281cfa2b021fb1ea0/src/server/game/Handlers/MailHandler.cpp#L36-L60

@ataraxyaffliction
Copy link
Author

The Eluna documentation says that you need to pass the player's ID. If i try to pass the Mailbox object ID, nothing happens. Is it possible to open a game object interaction (for example, a mailbox or a guild bank)? Unfortunately, I didn't find anything in the documentation.

@ataraxyaffliction
Copy link
Author

Yes, if you grant rbac permission 777 for the account, then everything works. As I understand, there are two options - grant permission, or remove the check from the core.

@Rochet2
Copy link
Member

Rochet2 commented Jul 22, 2022

Is the mailbox close enough? The mailbox must be within interaction distance.

@ataraxyaffliction
Copy link
Author

ataraxyaffliction commented Jul 22, 2022

Is the mailbox close enough? The mailbox must be within interaction distance.

Yeah, if mailbox close enough everything is working fine. But I wanted to use mail anywhere. I'll just add permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants