Jump to content

Official Mailbox


Recommended Posts

  • Active+ Member
10 minutes ago, Marcos17 said:

I implemented the System, and the only problem is that due to the mailbox item it doesn't open at all, due to the NPC it is working perfectly.

Note: There is no error in any of the syssers, neither in Release or Debug

you have a quest there for NPC.

 

I, for example, I made the window open with click on icon from minimap.

  • Metin2 Dev 1

spacer.png

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 3 months later...
  • 2 weeks later...
Spoiler
On 9/14/2023 at 3:19 PM, HFWhite said:

FIXED!

 

I've added a separate check for bIsGMPost

    if (p.Message.bIsGMPost == true) {
        p.Message.DeleteTime = p.Message.SendTime + EMAILBOX::MAILBOX_REMAIN_DAY_GM * 60 * 60 * 24;
    } else {
        p.Message.DeleteTime = p.Message.SendTime + EMAILBOX::MAILBOX_REMAIN_DAY * 60 * 60 * 24;
    }

and a check for if owner is GM

    if (Owner->IsGM())
    {
        p.Message.bIsGMPost = true;
    }

this fixed my issue 🙂 

GIF: 

spacer.png

 

 

I tried the below in my case works fine. Same result, just need to change the order of checking.

1. On MailBox.cpp, find the << void CMailBox::ServerProcess(const BYTE SubHeader, const BYTE arg1, const BYTE arg2) const >> ,

1.1 Search the below:

Spoiler

p.Message.bIsGMPost = Owner->IsGM();

2. Move the previous line of code, above of:

Spoiler

p.Message.DeleteTime = p.Message.SendTime + (p.Message.bIsGMPost ? EMAILBOX::MAILBOX_REMAIN_DAY_GM : EMAILBOX::MAILBOX_REMAIN_DAY) * 60 * 60 * 24;

Should look like this:

Spoiler

    p.Message.SendTime = time(nullptr);

    p.Message.bIsGMPost = Owner->IsGM();

    p.Message.DeleteTime = p.Message.SendTime + (p.Message.bIsGMPost ? EMAILBOX::MAILBOX_REMAIN_DAY_GM : EMAILBOX::MAILBOX_REMAIN_DAY) * 60 * 60 * 24;

    std::memcpy(p.Message.szTitle, szTitle, sizeof(p.Message.szTitle));

    p.Message.bIsConfirm = false;

 

Edited by nora
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.