Jump to content

Recommended Posts

Hello. I was trying to add new armor subtype and sadly i got stuck. Item appears in game but when i click on it instead of moving into prepared slot it disapears from Inventory. Could sameone please tell what i might do wrong or which files i missed.

Files i already modifed:

Src Client - GameLib/ItemData.h , Userinterface/GameType.h , Userinterface/PythonItemModule.cpp

Src Server - common/item_lenght.h , common/lenght.h , db/ProtoReader.cpp , game/char_item.cpp , game/item.cpp

Client - ui/inventorywindow.py , uitooltip.py *if i add localeInfo.TOOLTIP_TALIZMAN client can't connect to the server and returns ,,networkModule.SetSelectCharacterPhase - <type 'exceptions.AttributeError'>:'module' object has no attribute 'TOOLTIP_TALIZMAN' ,, without this line client have no problem with connecting to server

+ Proto generator and Proto converter

*Source - Mainline_Relase

Link to comment
https://metin2.dev/topic/21897-new-armor-subtype/
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Thanks that fixed half of problem. In GameType.h i only added const DWORD c_Equipment_Talizman    = c_Equipment_Start + 11; under const DWORD c_Equipment_Shield    = c_Equipment_Start + 10; and in Inventory window i removed Mallbox button and in it's x and y I  added slot {"index":EQUIPMENT_START_INDEX+11, "x":2, "y":106, "width":32, "height":32}, . I tried also to change item.EQUIPMENT_RING1 into EQUIPMENT_START_INDEX+11 but item is still invisible in equipment part , but this time it don't disapears from inventory but ,,goes,, there where should go because if i use other item with this type and subtype previous comes back.

Link to comment
https://metin2.dev/topic/21897-new-armor-subtype/#findComment-119067
Share on other sites

Problem solved, big thanks WLsj25 for help. 

If anyone would have same problem add this:

Server  ../src/game/item.cpp

// Search 
	int CItem::FindEquipCell(LPCHARACTER ch, int iCandidateCell)
  
 // Add Somewhere
		if (GetType() == ITEM_ARMOR && GetSubType() == ARMOR_TALIZMAN)
			return WEAR_TALIZMAN;

*Atleast this worked for me

Link to comment
https://metin2.dev/topic/21897-new-armor-subtype/#findComment-119071
Share on other sites

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.