Jump to content

Recommended Posts

  • Honorable Member
6 minutes ago, zsoltiabeka10 said:

@ Mali A small thing that I've found out with the InitializeMailBoxTable() function:
If you have it like in the repo, whenever you try /reload the mailbox table will fail and you can't reload your protos and stuff because it returns false if the table isn't empty.

I changed it to skip loading it into the pointer if it already has data (from booting up the server).
Because clearing the memory and inserting into it again caused me attachments reappear so that method didn't work for me.

Maybe that could be a solution if anyone else having a problem like that.

//repo
bool CClientManager::InitializeMailBoxTable()
{
	if (m_map_mailbox.empty() == false)
		return false;

	.....

}

// change ?
bool CClientManager::InitializeMailBoxTable()
{
	//if (m_map_mailbox.empty() == false)
		//return false;

	if (!m_map_mailbox.empty())
		return true;

	....
 }

 

Reload?

That function for only boot. Why are you reloading?

edit: I get it, for protos. I will change thanks

Edited by Mali
  • Metin2 Dev 1
  • muscle 1
  • Love 1

 

Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-143304
Share on other sites

  • 2 weeks later...

@ Mali do you know the cause of this error (while compiling DB Source)? Can you help me please?

'unordered_set' in namespace 'std' does not name a template type
  static std::unordered_set<std::string> NameSet;

and

'NameSet' was not declared in this scope
  bool bFound = NameSet.find(p->szName) != NameSet.end();


SOLVED, FIX:

#include <unordered_set>

 

Edited by SCOOB
  • muscle 1
Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-143809
Share on other sites

When I receive a normal mail (not from a GM) the time is still 7 Days. Even though in tables.h is set to be 30 days.

Edit: Sometimes it shows 7 or 30 days, randomly.

I had messages from GM that were 30 days and messages from players that were 7 days. And the other way around.

So something is wrong with these:

    MAILBOX_REMAIN_DAY = 30,
    MAILBOX_REMAIN_DAY_GM = 7,

 

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
  • kekw 1
Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-143824
Share on other sites

  • 3 weeks later...
On 10/2/2021 at 11:50 PM, SCOOB said:

When I receive a normal mail (not from a GM) the time is still 7 Days. Even though in tables.h is set to be 30 days.

Edit: Sometimes it shows 7 or 30 days, randomly.

I had messages from GM that were 30 days and messages from players that were 7 days. And the other way around.

So something is wrong with these:

    MAILBOX_REMAIN_DAY = 30,
    MAILBOX_REMAIN_DAY_GM = 7,

 

 

Still have this issue, how to fix?

Spoiler

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-144347
Share on other sites

For db syserr.txt, it always gives attrtype8 attrtype 9 attrtype10 ......... addfield syserr like this.
I add it for mailbox and it keeps asking me to add it. 10 11 12 13 14 like a joke ?

Edited by EAkar
Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-144351
Share on other sites

  • 4 months later...
3 hours ago, Cryptex said:

if i send alchemy and accept he told me i have inventory full...

Open exchange.cpp file, and search this: 

if (0 == s_vDSGrid[wBasePos])

Change wBasePos to wPos.

Like this:

if (0 == s_vDSGrid[wPos])

 

Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-147942
Share on other sites

  • Bot
44 minutes ago, Chookez said:

Open exchange.cpp file, and search this: 

if (0 == s_vDSGrid[wBasePos])

Change wBasePos to wPos.

Like this:

if (0 == s_vDSGrid[wPos])

 

it's the same.. 

inventory is full

spacer.png

Edited by Metin2 Dev
Core X - External 2 Internal

english_banner.gif

Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-147943
Share on other sites

  • 2 months later...
Spoiler

spacer.png

Hello guys. I have a problem, if i get a message on the minimap don't show up the mailbox icon until character change or logout, and if i read the message don't disappear until log out or character change, what i do wrong?

Thank you in advance for your help.

@ Mali

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-149290
Share on other sites

  • 2 months later...

For some reason,i click on npc and nothing happens.Client sysser is empty...

“𝓐𝓵𝓵 𝔀𝓮 𝓱𝓪𝓿𝓮 𝓽𝓸 𝓭𝓮𝓬𝓲𝓭𝓮 𝓲𝓼 𝔀𝓱𝓪𝓽 𝓽𝓸 𝓭𝓸 𝔀𝓲𝓽𝓱 𝓽𝓱𝓮 𝓽𝓲𝓶𝓮 𝓽𝓱𝓪𝓽 𝓲𝓼 𝓰𝓲𝓿𝓮𝓷 𝓾𝓼.” ~ 𝓖𝓪𝓷𝓭𝓪𝓵𝓯 𝓽𝓱𝓮 𝓖𝓻𝓮𝔂

Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-150775
Share on other sites

When i click on "Open mailbox" nothing happens after..

“𝓐𝓵𝓵 𝔀𝓮 𝓱𝓪𝓿𝓮 𝓽𝓸 𝓭𝓮𝓬𝓲𝓭𝓮 𝓲𝓼 𝔀𝓱𝓪𝓽 𝓽𝓸 𝓭𝓸 𝔀𝓲𝓽𝓱 𝓽𝓱𝓮 𝓽𝓲𝓶𝓮 𝓽𝓱𝓪𝓽 𝓲𝓼 𝓰𝓲𝓿𝓮𝓷 𝓾𝓼.” ~ 𝓖𝓪𝓷𝓭𝓪𝓵𝓯 𝓽𝓱𝓮 𝓖𝓻𝓮𝔂

Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-150790
Share on other sites

  • 9 months later...
  • 4 months later...
On 10/19/2021 at 1:20 PM, SCOOB said:

 

Still have this issue, how to fix?

  Hide contents

.png

still have this issue, did anyone find a fix?

 

This is the only issue: Both GM and normal mail have the same time duration. it should be different.

Edited by SCOOB
Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-159558
Share on other sites

On 10/2/2021 at 11:50 PM, SCOOB said:

When I receive a normal mail (not from a GM) the time is still 7 Days. Even though in tables.h is set to be 30 days.

 

Edit: Sometimes it shows 7 or 30 days, randomly.

I had messages from GM that were 30 days and messages from players that were 7 days. And the other way around.

So something is wrong with these:

    MAILBOX_REMAIN_DAY = 30,
    MAILBOX_REMAIN_DAY_GM = 7,

 

  Reveal hidden contents

.png

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

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Love 1
Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-159574
Share on other sites

  • 2 weeks later...

Someone could help with this? 

 

Quote

compile MailBox.cpp
MailBox.cpp:473:112: error: cannot initialize a parameter of type 'LPITEM' (aka'CItem *') with an rvalue of type 'BYTE' (aka 'unsigned char')
                const DWORD pos = item->IsDragonSoul() ? Owner->GetEmptyDragonSulInventory(item) : Owner->GetEmptyInventory(item->GetSize());
                                                                                                                                                                                                                       ^~~~~~~~~~~~~~~
./char.h:1172:35: note: passing argument to parameter 'item' here
                int                             GetEmptyInventory(LPITEM item) onst;
                                                                         ^
1 error generated.
gmake: *** [Makefile:104: OBJDIR/MailBox.o] Error 1

 

Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-159748
Share on other sites

On 9/24/2023 at 8:08 PM, Ballads said:

I found a bug:

If you send a message to someone and accidentally enter an upper or lower case letter, the message is sent normally but does not reach the recipient.

Here's the FIX for this issue my friend @ Ballads

ClientManager.cpp find:

snprintf(s_szQuery, sizeof(s_szQuery), "SELECT * FROM player%s WHERE `name` = '%s' LIMIT 1", GetTablePostfix(), p->szName);

and replace with this:

snprintf(s_szQuery, sizeof(s_szQuery), "SELECT * FROM player%s WHERE `name` = convert('%s' using utf8mb4) collate utf8mb4_bin LIMIT 1", GetTablePostfix(), p->szName);

 

 now, the check name is case-sensitive. meaning:

 

If the player you want to send a message is named "Scoob" and you type "sCoob" the server will tell you that the player does not exist.

 

Have a great October! ?

Edited by SCOOB
found FIX
  • Love 1
Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-159914
Share on other sites

11 hours ago, SCOOB said:

Here's the FIX for this issue my friend @ Ballads

ClientManager.cpp find:

snprintf(s_szQuery, sizeof(s_szQuery), "SELECT * FROM player%s WHERE `name` = '%s' LIMIT 1", GetTablePostfix(), p->szName);

and replace with this:

snprintf(s_szQuery, sizeof(s_szQuery), "SELECT * FROM player%s WHERE `name` = convert('%s' using utf8mb4) collate utf8mb4_bin LIMIT 1", GetTablePostfix(), p->szName);

 

 now, the check name is case-sensitive. meaning:

 

If the player you want to send a message is named "Scoob" and you type "sCoob" the server will tell you that the player does not exist.

 

Have a great October! ?

Bro, i have no words to say how I'm happy with it. You are the best! have a great LIFE! ♥ 

Link to comment
https://metin2.dev/topic/27874-official-mailbox/page/2/#findComment-159917
Share on other sites

  • 2 weeks later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.