Jump to content
metin2dev
Sign in to follow this  
Weles

[HowTo]Items with the effect of use

Recommended Posts

/// UserInterface -> Packet.h ///

Search: SE_EQUIP_RAMADAN_RING,
Add below: SE_EQUIP_WELES_RING1,

/// UserInterface -> InstanceBase.h ///

Search: EFFECT_RAMADAN_RING_EQUIP,
Add below: EFFECT_WELES_RING1_EQUIP,

/// UserInterface -> PythonCharacterManagerModule.cpp ///

Search: PyModule_AddIntConstant(poModule, "EFFECT_RAMADAN_RING_EQUIP",            CInstanceBase::EFFECT_RAMADAN_RING_EQUIP);
Add below: PyModule_AddIntConstant(poModule, "EFFECT_WELES_RING1_EQUIP",            CInstanceBase::EFFECT_WELES_RING1_EQUIP);

/// UserInterface -> PythonNetworkStreamPhaseGameItem.cpp ///

Search:

        case SE_EQUIP_RAMADAN_RING:
            effect = CInstanceBase::EFFECT_RAMADAN_RING_EQUIP;
            break;

Add below:

        case SE_EQUIP_WELES_RING1:
            effect = CInstanceBase::EFFECT_WELES_RING1_EQUIP;
            break;

/// game/src -> char_item.cpp ///

Search:

        if (true == CItemVnumHelper::IsRamadanMoonRing(dwVnum))
        {
            this->EffectPacket(SE_EQUIP_RAMADAN_RING);
        }
	
Add below:
        else if (true == CItemVnumHelper::IsWELESRing1(dwVnum))
        {
            this->EffectPacket(SE_EQUIP_WELES_RING1);
        }

/// game/src -> item.cpp ///

Search:
    if (true == CItemVnumHelper::IsRamadanMoonRing(GetVnum()) || true == CItemVnumHelper::IsHalloweenCandy(GetVnum())
        || true == CItemVnumHelper::IsHappinessRing(GetVnum()) || true == CItemVnumHelper::IsLovePendant(GetVnum()))

Add to the function: || true == CItemVnumHelper::IsWELESRing1(GetVnum())

Example:

    if (true == CItemVnumHelper::IsRamadanMoonRing(GetVnum()) || true == CItemVnumHelper::IsHalloweenCandy(GetVnum())
        || true == CItemVnumHelper::IsHappinessRing(GetVnum()) || true == CItemVnumHelper::IsLovePendant(GetVnum())
        || true == CItemVnumHelper::IsWELESRing1(GetVnum()))

/// common -> leght.h ///

Search: SE_EQUIP_RAMADAN_RING,
Add below: SE_EQUIP_WELES_RING1,

/// common -> VnumHelper.h ///

Search: static    const bool    IsRamadanMoonRing(DWORD vnum)        { return 71135 == vnum; }
Add below: static    const bool    IsWELESRing1(DWORD vnum)        { return YOUR_ID == vnum; }

/// root -> playersettingsmodule.py ///

Search: chrmgr.RegisterCacheEffect(chrmgr.EFFECT_RAMADAN_RING_EQUIP, "", "d:/ymir work/effect/etc/buff/buff_item1.mse")
Add below: chrmgr.RegisterCacheEffect(chrmgr.EFFECT_WELES_RING1_EQUIP, "", "d:/ymir work/effect/etc/buff/your_effect.mse")

/// item_proto ///

Type: 16
Subtype: 0
WearFlags: 128

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Weles said:

@amosth

Hey you need to do the tutorial again just changing the name, e.g. "IsWELESRing1" to "IsWELESRing2"

item_proto and the calculation of wearflag to IsWELESRing2?

Share this post


Link to post
Share on other sites
1 minute ago, Weles said:

No no, item proto any id and wearflag always this same (128)

thanks man

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×