Jump to content

Wrong equipment slot number in database ?


Go to solution Solved by ARiver,

Recommended Posts

  • Premium

Hello,

I Have tried to add this system:

But I have an issue:

I don't even use the system for now but when i tried to equip a shield he goes into the unique items slots (i can equip two shield).

The unique item are going into the shield slot. Every other equipment are going into their dedicated slots even costumes.

In the DB the slots numbers (from lengt.h are switched).

I cannot understand why, i have tried a lot of things, i guess it's serverside but i can't see why such a switch between only those two equipments 

 

here are my files and some screens :

Common/lenght.h:

Spoiler
enum EWearPositions
{
	WEAR_BODY,		// 0
	WEAR_HEAD,		// 1
	WEAR_FOOTS,		// 2
	WEAR_WRIST,		// 3
	WEAR_WEAPON,	// 4
	WEAR_NECK,		// 5
	WEAR_EAR,		// 6
#ifndef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
	WEAR_UNIQUE1,       // x7
	WEAR_UNIQUE2,       // x8
#endif
	WEAR_ARROW,		// 7 
	WEAR_SHIELD,	// 8 
#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
	WEAR_BELT,			// 9 
	WEAR_PENDANT,		// 10 
	WEAR_GLOVE,			//11 
	// Second Equipment
	WEAR_SECOND_BODY,	// 12
	WEAR_SECOND_HEAD,	// 13
	WEAR_SECOND_FOOTS,	// 14
	WEAR_SECOND_WRIST,	// 15
	WEAR_SECOND_WEAPON,	// 16
	WEAR_SECOND_NECK,	// 17
	WEAR_SECOND_EAR,	// 18
	WEAR_SECOND_ARROW,	// 19
	WEAR_SECOND_SHIELD,	// 20
	WEAR_SECOND_BELT,	// 21
	WEAR_SECOND_PENDANT,	// 22
	WEAR_SECOND_GLOVE,	// 23 
#endif
  
#ifndef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
    WEAR_ABILITY1,  // 11
    WEAR_ABILITY2,  // 12
    WEAR_ABILITY3,  // 13
    WEAR_ABILITY4,  // 14
    WEAR_ABILITY5,  // 15
    WEAR_ABILITY6,  // 16
    WEAR_ABILITY7,  // 17
    WEAR_ABILITY8,  // 18
#endif
	WEAR_COSTUME_BODY,	// 24 
	WEAR_COSTUME_HAIR,	// 25 
	WEAR_COSTUME_ACCE,	//26 
	WEAR_COSTUME_WEAPON,	//27 
	WEAR_COSTUME_MOUNT,		//28 

#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
	WEAR_UNIQUE1,		// 29 
	WEAR_UNIQUE2,		// 30 
#else
	WEAR_RING1,			// 24	: ½Å±Ô ¹ÝÁö½½·Ô1 (¿ÞÂÊ)
	WEAR_RING2,			// 25	: ½Å±Ô ¹ÝÁö½½·Ô2 (¿À¸¥ÂÊ)
	WEAR_BELT,			// 26	: ½Å±Ô ¹ÝÁö½½·Ô3 (¿À¸¥ÂÊ)
	WEAR_PENDANT,		// 27
	WEAR_GLOVE,			//28
#endif
	WEAR_MAX = 32	// 
};

 

 

 

Common/item_lenght.h:

Spoiler
enum EItemWearableFlag
{
	WEARABLE_BODY	= (1 << 0),
	WEARABLE_HEAD	= (1 << 1),
	WEARABLE_FOOTS	= (1 << 2),
	WEARABLE_WRIST	= (1 << 3),
	WEARABLE_WEAPON	= (1 << 4),
	WEARABLE_NECK	= (1 << 5),
	WEARABLE_EAR	= (1 << 6),
#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
	WEARABLE_ARROW = (1 << 7),
	WEARABLE_SHIELD = (1 << 8),
	WEARABLE_BELT = (1 << 9),
	WEARABLE_PENDANT = (1 << 10),
	WEARABLE_GLOVE = (1 << 11),
	WEARABLE_COSTUME_BODY = (1 << 12),
	WEARABLE_COSTUME_HAIR = (1 << 13),
	WEARABLE_COSTUME_ACCE = (1 << 14),
	WEARABLE_COSTUME_WEAPON = (1 << 15),
	WEARABLE_COSTUME_MOUNT = (1 << 16),
	WEARABLE_UNIQUE = (1 << 17),
#else
	WEARABLE_UNIQUE = (1 << 7),
	WEARABLE_SHIELD = (1 << 8),
	WEARABLE_ARROW = (1 << 9),
	WEARABLE_HAIR = (1 << 10),
	WEARABLE_ABILITY = (1 << 11),
	WEARABLE_COSTUME_BODY = (1 << 12),
	WEARABLE_COSTUME_ACCE = (1 << 13),
	WEARABLE_COSTUME_WEAPON = (1 << 14),
	WEARABLE_COSTUME_MOUNT = (1 << 15),
	WEARABLE_PENDANT = (1 << 16),
	WEARABLE_GLOVE = (1 << 17),
#endif
};

 

 

 

db/ProtoReader.cpp and dumpproto/ItemCSVReader.cpp:

Spoiler
string arWearrFlag[] = {"WEAR_BODY", "WEAR_HEAD", "WEAR_FOOTS", "WEAR_WRIST", "WEAR_WEAPON",
						"WEAR_NECK", "WEAR_EAR", "WEAR_ARROW", "WEAR_SHIELD", "WEAR_BELT",
						"WEAR_PENDANT", "WEAR_GLOVE", "WEAR_COSTUME_BODY", "WEAR_COSTUME_HAIR",
						"WEAR_COSTUME_ACCE", "WEAR_COSTUME_WEAPON", "WEAR_COSTUME_MOUNT", "WEAR_UNIQUE"
};

 

DB:

.jpg

 

In Game:

.jpg

 

 

Clientsrc/GameLib/ItemData.h:

Spoiler
		enum EWearPositions
		{
			WEAR_BODY,          // 0
			WEAR_HEAD,          // 1
			WEAR_FOOTS,         // 2
			WEAR_WRIST,         // 3
			WEAR_WEAPON,        // 4
			WEAR_NECK,          // 5
			WEAR_EAR,           // 6
#ifndef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
			WEAR_UNIQUE1,       // 7
			WEAR_UNIQUE2,       // 8
#endif
			WEAR_ARROW,         // 7
			WEAR_SHIELD,        // 8
#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
			WEAR_BELT,			// 9
#endif
			WEAR_PENDANT,		// 10
			WEAR_GLOVE,			// 11
			WEAR_COSTUME_BODY,	//12
			WEAR_COSTUME_HAIR,	//13
			WEAR_COSTUME_ACCE,	//14
#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
			WEAR_UNIQUE1,		// 15
			WEAR_UNIQUE2,		// 16
#endif
			WEAR_MAX_NUM,
		};

		enum EItemWearableFlag
		{
			WEARABLE_BODY = (1 << 0),
			WEARABLE_HEAD = (1 << 1),
			WEARABLE_FOOTS = (1 << 2),
			WEARABLE_WRIST = (1 << 3),
			WEARABLE_WEAPON = (1 << 4),
			WEARABLE_NECK = (1 << 5),
			WEARABLE_EAR = (1 << 6),
#ifdef ENABLE_ADDITIONAL_EQUIPMENT_PAGE
			WEARABLE_ARROW = (1 << 7),
			WEARABLE_SHIELD = (1 << 8),
			WEARABLE_BELT = (1 << 9),
			WEARABLE_PENDANT = (1 << 10),
			WEARABLE_GLOVE = (1 << 11),
			WEARABLE_UNIQUE = (1 << 12),
#else
			WEARABLE_UNIQUE = (1 << 7),
			WEARABLE_SHIELD = (1 << 8),
			WEARABLE_ARROW = (1 << 9),
			WEARABLE_PENDANT = (1<<10),
			WEARABLE_GLOVE = (1 << 11),
#endif
		};

 

 

 

Best regards ARiver.

Link to comment
https://metin2.dev/topic/33708-wrong-equipment-slot-number-in-database/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Premium
  • Solution

I've found the issue ...pretty simple im so dumb: I use TMP4 reference file and in the item_proto.txt Wearflags for shields were set to WEAR_UNIQUE, and Item_UNIQUE wearflags are set to WEAR_SHIELD, if you want to use the system you might want to change that (as GF have made in their latest protos).

 

There is still a Bug with the system : when you have two sets of equipments the character stats value ( armor, attack value...) are additionned maybe i missed something in client src ?? 

 

Best regards

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.