Guarczewski 0 Posted September 6, 2019 Share Posted September 6, 2019 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 Share on other sites More sharing options...
Bot Metin2 Dev 4873 Posted September 6, 2019 Bot Share Posted September 6, 2019 If you item disapears, then maybe is problem with python (inventorywindow.py) or with GameType.h and the 'module' object ....... 'TOOLTIP_TALIZMAN' is because you havent it in locale_game.txt Link to comment Share on other sites More sharing options...
Guarczewski 0 Posted September 6, 2019 Author Share Posted September 6, 2019 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 Share on other sites More sharing options...
Bot Metin2 Dev 4873 Posted September 6, 2019 Bot Share Posted September 6, 2019 you're still having problems on GameType.h Spoiler const DWORD c_Equipment_Talizman = c_Equipment_Start + CItemData::WEAR_TALIZMAN; WEAR_TALIZMAN maybe is different. check itemdata.h Link to comment Share on other sites More sharing options...
Guarczewski 0 Posted September 6, 2019 Author Share Posted September 6, 2019 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 Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now