Jump to content

New Armor Subtype


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
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
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
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      Target Information System

    2. 1

      Feeding game source to LLM

    3. 2

      anti exp explanation pls

    4. 1

      Feeding game source to LLM

    5. 2

      anti exp explanation pls

    6. 0

      [GR2] Positioning an object added with "Attach"

    7. 1417

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.