Jump to content

Bug in soul bind system <video>


Recommended Posts

  • 1 year later...

I don't have this system and files are no longer avaible, however I think the problem could be one and only, query to store item won't save the parameter which determines the binding of the item. If you can't still find it out please share how your Soulbind System is implemented in db and you'll have your answer.

Link to comment
Share on other sites

8 minutes ago, OtherChoice said:

I don't have this system and files are no longer avaible, however I think the problem could be one and only, query to store item won't save the parameter which determines the binding of the item. If you can't still find it out please share how your Soulbind System is implemented in db and you'll have your answer.

I installed the same system as the creator of the post and I have the same problem.

Cache.cpp https://paste.ubuntu.com/p/p5ZspKdKcc/

ClientManager.cpp https://paste.ubuntu.com/p/GQqnVVwwz5/

ClientManagerPlayer.cpp https://paste.ubuntu.com/p/2KN9SxysjP/

tenor.gif

Link to comment
Share on other sites

14 hours ago, cjunior2011 said:

I installed the same system as the creator of the post and I have the same problem.

Cache.cpp https://paste.ubuntu.com/p/p5ZspKdKcc/

ClientManager.cpp https://paste.ubuntu.com/p/GQqnVVwwz5/

ClientManagerPlayer.cpp https://paste.ubuntu.com/p/2KN9SxysjP/

next time don't show full source just the implementation so who wants to help you doesn't have to search in 3000 lines of code, however i need one more information: try depositing a bind item into storage, close storage and logout from game, then go into your DB player and check inside "item" for your item. It should show window = SAFEBOX, if not DB is still not updated and shall you wait a minute. After your item displays the correct window check the column "sealbind" (or anything you chosed to use), if the value is still set then its a missing client binary part (packet with HEADER_GC_SAFEBOX_SET missing long sealbind; and it implementation). Otherwise i'll look deeper into those 3000 lines of code.

 

  • Love 1
Link to comment
Share on other sites

7 hours ago, OtherChoice said:

next time don't show full source just the implementation so who wants to help you doesn't have to search in 3000 lines of code, however i need one more information: try depositing a bind item into storage, close storage and logout from game, then go into your DB player and check inside "item" for your item. It should show window = SAFEBOX, if not DB is still not updated and shall you wait a minute. After your item displays the correct window check the column "sealbind" (or anything you chosed to use), if the value is still set then its a missing client binary part (packet with HEADER_GC_SAFEBOX_SET missing long sealbind; and it implementation). Otherwise i'll look deeper into those 3000 lines of code.

 

I'm sorry for having posted the complete source code, I will edit this post and show only the parts of the system in the codes, I did your test and the result was:
1- When I put the item linked to the warehouse, it loses the link instantly:

https://metin2.download/picture/81spJQPnH9to5Jd6tEN1b6KaGC04XZb8/.gifv

2- I believe that the number that is listed in the SAFEBOX item table is wrong:

Spoiler

image.png.81d73a7dc5d684e7bb24385cce443ea0.png

ps: is there any way to prevent putting any locked item in the warehouse?

I think this would solve my problem faster. (I do not know if that's how it works in the official)

Edited by Metin2 Dev
Core X - External 2 Internal

tenor.gif

Link to comment
Share on other sites

  • Premium

It's like official.

Item block = Can't go out from the ACCOUNT -> not just from char.

 

Btw if you want to block there too:

File: input_main.cpp

Find for:  "void CInputMain::SafeboxCheckin"

Find this if:   "if (true == pkItem->isLocked())"

 

Add this new check after:

Spoiler

#ifdef ENABLE_SOULBIND_SYSTEM
    if (pkItem->IsBind() || pkItem->IsUntilBind())
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "??????????????????????");
        return;
    }
#endif

 

  • Love 2
Link to comment
Share on other sites

11 hours ago, OtherChoice said:

Did you tried getting back the item from the storage? does it get binding back or is it still lost?

when I take the item out of the warehouse, it continues without the bind/lock.

 

2 hours ago, WeedHex said:

It's like official.

Item block = Can't go out from the ACCOUNT -> not just from char.

 

Btw if you want to block there too:

File: input_main.cpp

Find for:  "void CInputMain::SafeboxCheckin"

Find this if:   "if (true == pkItem->isLocked())"

 

Add this new check after:

  Hide contents

#ifdef ENABLE_SOULBIND_SYSTEM
    if (pkItem->IsBind() || pkItem->IsUntilBind())
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "??????????????????????");
        return;
    }
#endif

 

I'll test this, thx.

edit: I adapted your code to my system and it worked perfectly, thank you @OtherChoice and @WeedHex! #SOLVED

#ifdef ENABLE_SOULBIND_SYSTEM
    if (pkItem->IsSealed())
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "Can't put sealed items in the warehouse");
        return;
    }
#endif

 

image.png.e403b162000e70db8c73b27d8de3ae2c.png

tenor.gif

Link to comment
Share on other sites

On 5/8/2019 at 11:24 AM, WeedHex said:

It's like official.

Item block = Can't go out from the ACCOUNT -> not just from char.

 

Btw if you want to block there too:

File: input_main.cpp

Find for:  "void CInputMain::SafeboxCheckin"

Find this if:   "if (true == pkItem->isLocked())"

 

Add this new check after:

  Reveal hidden contents

#ifdef ENABLE_SOULBIND_SYSTEM
    if (pkItem->IsBind() || pkItem->IsUntilBind())
    {
        ch->ChatPacket(CHAT_TYPE_INFO, "??????????????????????");
        return;
    }
#endif

 

New problem :(

after reset server items equiped or with bind they looked like this:

equiped item:

https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

item that was bind / bound / blocked:

https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif

any solution or is it normal to lose the bind after resetting the server?

Edited by Metin2 Dev
Core X - External 2 Internal

tenor.gif

Link to comment
Share on other sites

please show this struct of your client binary (or the second one in case you client uses it). You can check whether is used in bool CPythonNetworkStream::RecvSafeBoxSetPacket() (PythonNetworkStreamPhaseGame.cpp)

typedef struct packet_set_item
{
	BYTE		header;
	TItemPos	Cell;
	DWORD		vnum;
	BYTE		count;
	long		alSockets[CItemData::ITEM_SOCKET_MAX_NUM];
    TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
} TPacketGCItemSet;
typedef struct packet_set_item2
{
	BYTE		header;
	TItemPos	Cell;
	DWORD		vnum;
	BYTE		count;
	DWORD		flags;	// Ç÷¡±× Ãß°¡
	DWORD		anti_flags;	// Ç÷¡±× Ãß°¡
	bool		highlight;
	long		alSockets[CItemData::ITEM_SOCKET_MAX_NUM];
    TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
} TPacketGCItemSet2;

from server/common in tables.h show

typedef struct SPlayerItem
{
	DWORD	id;
	BYTE	window;
	WORD	pos;
	DWORD	count;

	DWORD	vnum;
	long	alSockets[ITEM_SOCKET_MAX_NUM];	// 소켓번호

	TPlayerItemAttribute    aAttr[ITEM_ATTRIBUTE_MAX_NUM];

	DWORD	owner;
} TPlayerItem;

and from client binary in GameType.h show

typedef struct packet_item
{
    DWORD       vnum;
    BYTE        count;
	DWORD		flags;
	DWORD		anti_flags;
	long		alSockets[CItemData::ITEM_SOCKET_MAX_NUM];
    TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
} TItemData;

 

Link to comment
Share on other sites

9 hours ago, OtherChoice said:

please show this struct of your client binary (or the second one in case you client uses it). You can check whether is used in bool CPythonNetworkStream::RecvSafeBoxSetPacket() (PythonNetworkStreamPhaseGame.cpp)


typedef struct packet_set_item
{
	BYTE		header;
	TItemPos	Cell;
	DWORD		vnum;
	BYTE		count;
	long		alSockets[CItemData::ITEM_SOCKET_MAX_NUM];
    TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
} TPacketGCItemSet;
typedef struct packet_set_item2
{
	BYTE		header;
	TItemPos	Cell;
	DWORD		vnum;
	BYTE		count;
	DWORD		flags;	// Ç÷¡±× Ãß°¡
	DWORD		anti_flags;	// Ç÷¡±× Ãß°¡
	bool		highlight;
	long		alSockets[CItemData::ITEM_SOCKET_MAX_NUM];
    TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
} TPacketGCItemSet2;

from server/common in tables.h show


typedef struct SPlayerItem
{
	DWORD	id;
	BYTE	window;
	WORD	pos;
	DWORD	count;

	DWORD	vnum;
	long	alSockets[ITEM_SOCKET_MAX_NUM];	// 소켓번호

	TPlayerItemAttribute    aAttr[ITEM_ATTRIBUTE_MAX_NUM];

	DWORD	owner;
} TPlayerItem;

and from client binary in GameType.h show


typedef struct packet_item
{
    DWORD       vnum;
    BYTE        count;
	DWORD		flags;
	DWORD		anti_flags;
	long		alSockets[CItemData::ITEM_SOCKET_MAX_NUM];
    TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
} TItemData;

 

Spoiler

typedef struct packet_set_item
{
    BYTE        header;
    BYTE        pos;
    DWORD        vnum;
    BYTE        count;
    DWORD        flags;    // 플래그 추가
    long        alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
    TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
#ifdef ENABLE_SOULBIND_SYSTEM
    long        sealbind;
#endif
} TPacketGCItemSet;

typedef struct packet_set_item2
{
    BYTE        header;
    TItemPos    Cell;
    DWORD        vnum;
    BYTE        count;
    DWORD        flags;    // 플래그 추가
    DWORD        anti_flags;    // 플래그 추가
    bool        highlight;
    long        alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
    TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
#ifdef ENABLE_SOULBIND_SYSTEM
    long        sealbind;
#endif
} TPacketGCItemSet2;

 

 

Spoiler

typedef struct SPlayerItem
{
	DWORD	id;
	BYTE	window;
	WORD	pos;
	DWORD	count;

	DWORD	vnum;
	long	alSockets[ITEM_SOCKET_MAX_NUM];	// 소켓번호

	TPlayerItemAttribute    aAttr[ITEM_ATTRIBUTE_MAX_NUM];

	DWORD	owner;
#ifdef ENABLE_SOULBIND_SYSTEM
	long	sealbind;
#endif
} TPlayerItem;

 

 

Spoiler

typedef struct packet_item
{
	DWORD		vnum;
	BYTE		count;
	DWORD		flags;
	DWORD		anti_flags;
	long		alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
	TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
#ifdef ENABLE_SOULBIND_SYSTEM
	long		sealbind;
#endif
} TItemData;

 

 

CPythonNetworkStream::RecvSafeBoxSetPacket(): PythonNetworkStreamPhaseGameItem.cpp*

Spoiler

bool CPythonNetworkStream::RecvSafeBoxSetPacket()
{
	TPacketGCItemSet2 kItemSet;
	if (!Recv(sizeof(kItemSet), &kItemSet))
		return false;

	TItemData kItemData;
	kItemData.vnum	= kItemSet.vnum;
	kItemData.count = kItemSet.count;
	kItemData.flags = kItemSet.flags;
	kItemData.anti_flags = kItemSet.anti_flags;
	for (int isocket=0; isocket<ITEM_SOCKET_SLOT_MAX_NUM; ++isocket)
		kItemData.alSockets[isocket] = kItemSet.alSockets[isocket];
	for (int iattr=0; iattr<ITEM_ATTRIBUTE_SLOT_MAX_NUM; ++iattr)
		kItemData.aAttr[iattr] = kItemSet.aAttr[iattr];
#ifdef ENABLE_SOULBIND_SYSTEM
	kItemData.sealbind = kItemSet.sealbind;
#endif
	CPythonSafeBox::Instance().SetItemData(kItemSet.Cell.cell, kItemData);

	__RefreshSafeboxWindow();

	return true;
}

 

 

tenor.gif

Link to comment
Share on other sites

  • 2 weeks later...
On 5/25/2019 at 12:00 AM, jeddawee said:

@cjunior2011

there is other soulbind system with different coding , search for it 

 

i suggest you to delete this system and install the other one 

this problem happens with any item after restarting the server, I think it is not because of the soulbind system, I need to do some tests without enabling the system and testing with clean files without any system, thank you anyway!

tenor.gif

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.