Jump to content

WEAR_RING3, function.


Recommended Posts

So i added WEAR_RING3 like RING2 in sources, but i don't find how to make the function work cus rn it's working only with 2 rings. 

I've tried like this, and it's working only with 2 rings.

item.cpp
    else if (GetType() == ITEM_RING)
    {
        if (ch->GetWear(WEAR_RING1))
            return WEAR_RING2;
        else if (ch->GetWear(WEAR_RING2))
            return WEAR_RING3;
        else
            return WEAR_RING1;
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi.
You are need source for it.

Dump_proto/src

Spoiler

ItemCSVReader.cpp

Search:
int get_Item_WearFlag_Value(string inputString)In this func.:

"WEAR_RING2",
after add:
"WEAR_RING3",

Looks like this:

string arWearrFlag[] = {
        "WEAR_BODY",
        "WEAR_HEAD",
        "WEAR_FOOTS",
        "WEAR_WRIST",
        "WEAR_WEAPON",
        "WEAR_NECK",
        "WEAR_EAR",
        "WEAR_SHIELD",
        "WEAR_UNIQUE",
        "WEAR_ARROW",
        "WEAR_HAIR",
        "WEAR_ABILITY",
        "WEAR_COSTUME_BODY",
        "WEAR_COSTUME_HAIR",
#ifdef __SASH_SYSTEM__
        "WEAR_COSTUME_SASH",
#endif
#ifdef __WING_SYSTEM__
        "WEAR_COSTUME_WING",
#endif
#ifdef __COSTUME_WEAPON_SYSTEM__
        "WEAR_COSTUME_WEAPON",
#endif
        "WEAR_RING1",
        "WEAR_RING2",
        "WEAR_RING3",
        "WEAR_BELT"
    };


Szerver SRC/ Common 
 

Spoiler

Length.h

Search EWearPosition enums:

After WEAR_RING2, add:
WEAR_RING3,

Looks like:

 

enum EWearPositions
{
    WEAR_BODY,
    WEAR_HEAD,
    WEAR_FOOTS,
    WEAR_WRIST,
    WEAR_WEAPON,
    WEAR_NECK,
    WEAR_EAR,
    WEAR_UNIQUE1,
    WEAR_UNIQUE2,
    WEAR_ARROW,
    WEAR_SHIELD,
    WEAR_ABILITY1,
    WEAR_ABILITY2,
    WEAR_ABILITY3,
    WEAR_ABILITY4,
    WEAR_ABILITY5,
    WEAR_ABILITY6,
    WEAR_ABILITY7,
    WEAR_ABILITY8,
    WEAR_COSTUME_BODY,
    WEAR_COSTUME_HAIR,
#ifdef __SASH_SYSTEM__
    WEAR_COSTUME_SASH,
#endif
#ifdef __WING_SYSTEM__
    WEAR_COSTUME_WING,
#endif
#ifdef __COSTUME_WEAPON_SYSTEM__
    WEAR_COSTUME_WEAPON,
#endif
    WEAR_RING1,
    WEAR_RING2,
    WEAR_RING3,
    WEAR_BELT,

    WEAR_MAX = 32    // 
};


Szerver/DB/SRC
 

Spoiler

ProtoReader.cpp

Search:
int get_Item_WearFlag_Value(string inputString)In this func.:

"WEAR_RING2",
after add:
"WEAR_RING3",

Looks like this:

string arWearrFlag[] = {
        "WEAR_BODY",
        "WEAR_HEAD",
        "WEAR_FOOTS",
        "WEAR_WRIST",
        "WEAR_WEAPON",
        "WEAR_NECK",
        "WEAR_EAR",
        "WEAR_SHIELD",
        "WEAR_UNIQUE",
        "WEAR_ARROW",
        "WEAR_HAIR",
        "WEAR_ABILITY",
        "WEAR_COSTUME_BODY",
        "WEAR_COSTUME_HAIR",
#ifdef __SASH_SYSTEM__
        "WEAR_COSTUME_SASH",
#endif
#ifdef __WING_SYSTEM__
        "WEAR_COSTUME_WING",
#endif
#ifdef __COSTUME_WEAPON_SYSTEM__
        "WEAR_COSTUME_WEAPON",
#endif
        "WEAR_RING1",
        "WEAR_RING2",
        "WEAR_RING3",
        "WEAR_BELT"
    };


Szerver/GAME/SRC
 

Spoiler

item.cpp

search:
int CItem::FindEquipCell(LPCHARACTER ch, int iCandidateCell)

in this func:
 
in this" else if (GetType() == ITEM_RING)"

change like this:

if (ch->GetWear(WEAR_RING1) && ch->GetWear(WEAR_RING2))
            return WEAR_RING3;
        else if (ch->GetWear(WEAR_RING1) && ch->GetWear(WEAR_RING3))
            return WEAR_RING2;
        else if (ch->GetWear(WEAR_RING2) && ch->GetWear(WEAR_RING3))
            return WEAR_RING1;


Client/userintergface
 

Spoiler

GameType.h

Search #ifdef ENABLE_NEW_EQUIPMENT_SYSTEM

In this :
const DWORD c_New_Equipment_Ring2 = c_New_Equipment_Start + 1;
after add this:
const DWORD c_New_Equipment_Ring3 = c_New_Equipment_Start + 2;

Looks like:

#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
    const DWORD c_New_Equipment_Start = c_Costume_Slot_End;
    const DWORD c_New_Equipment_Count = 3;
    const DWORD c_New_Equipment_Ring1 = c_New_Equipment_Start + 0;
    const DWORD c_New_Equipment_Ring2 = c_New_Equipment_Start + 1;
    const DWORD c_New_Equipment_Ring3 = c_New_Equipment_Start + 2;
    const DWORD c_New_Equipment_Belt = c_New_Equipment_Start + 3;
    const DWORD c_Equipment_Slot_Count = 4;
    const DWORD c_New_Equipment_Slot_End = c_New_Equipment_Start + c_Equipment_Slot_Count;
#endif

Spoiler

PythonItemModule.cpp

search #ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
and
PyModule_AddIntConstant(poModule, "EQUIPMENT_RING2", c_New_Equipment_Ring2);
after add:
PyModule_AddIntConstant(poModule, "EQUIPMENT_RING3", c_New_Equipment_Ring3);

looks like:

#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
    PyModule_AddIntConstant(poModule, "EQUIPMENT_RING1", c_New_Equipment_Ring1);
    PyModule_AddIntConstant(poModule, "EQUIPMENT_RING2", c_New_Equipment_Ring2);
    PyModule_AddIntConstant(poModule, "EQUIPMENT_RING3", c_New_Equipment_Ring3);
    PyModule_AddIntConstant(poModule, "EQUIPMENT_BELT", c_New_Equipment_Belt);
#endif


It is just quick searching in source, maybe i forget something? 🙂

(Don't forget to add in python too)

Sorry for my bad english!
 

787292068_Nvtelen.png.6faa7b0bbb3398fd29

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.