Jump to content

Problem effect swords C++


Recommended Posts

Hi guys im have one peoble...

 

im add a new efect from my new seet weapons but this happens to me:

ac01235e74.jpg

50bf2330cc.jpg

CODE

Instancebase.cpp

    case CItemData::ITEM_TYPE_WEAPON:
        __ClearWeaponRefineEffect();
        //Agregas Nuevos Efectos
        if (pItem->GetSubType() == CItemData::WEAPON_SWORD)
        {
            DWORD vnum = pItem->GetIndex();

            if (vnum == 60299)
            {
                __AttachEffect(EFFECT_REFINED + EFFECT_SWORD_REFINED_SPECIAL1); //effect 24 sword effect
            }
        }

 

InstanceBase.h

 

            EFFECT_BODYARMOR_SPECIAL,    // °©¿Ê 4-2-1
            EFFECT_BODYARMOR_SPECIAL2,    // °©¿Ê 4-2-2
            EFFECT_ACCE_SPECIAL,

            EFFECT_SWORD_REFINED_SPECIAL1 = 23, // effect new


            EFFECT_REFINED_NUM,

 

 

playersettingmodule.py

 

    chrmgr.RegisterEffect(chrmgr.EFFECT_REFINED+23, "PART_WEAPON", "D:/ymir work/pc/common/effect/sword/revo_espada_s.mse")
 

any ideas?

 

Regards

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Premium

Try this

 

if (pItem->GetSubType() == CItemData::WEAPON_SWORD)
        {
            DWORD vnum = pItem->GetIndex();

            if (vnum == 60299)
            {
                __ClearWeaponRefineEffect();
                m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
                m_swordRefineEffectRight = EFFECT_REFINED +  EFFECT_SWORD_REFINED_SPECIAL1; //effect 24 sword effect
            }
        }

Link to comment
Share on other sites

3 hours ago, xP3NG3Rx said:

Seems syntax error.

But what's the problem?

If you unequip the new weapon, the effect will not removed?

Yeah bro.,...

 

3 hours ago, Sirio said:

Try this

 

if (pItem->GetSubType() == CItemData::WEAPON_SWORD)
        {
            DWORD vnum = pItem->GetIndex();

            if (vnum == 60299)
            {
                __ClearWeaponRefineEffect();
                m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7 + refine - 7;
                m_swordRefineEffectRight = EFFECT_REFINED +  EFFECT_SWORD_REFINED_SPECIAL1; //effect 24 sword effect
            }
        }

and probe that ... and not work

Link to comment
Share on other sites

I think this way use

if (pItem->GetSubType() == CItemData::WEAPON_SWORD)
        {
            DWORD vnum = pItem->GetIndex();

            if (vnum == 60299)
            // if (60299 <= vnum && vnum <= 60999)
            {
                m_swordRefineEffectRight = EFFECT_REFINED + EFFECT_SWORD_REFINED7;
                m_swordRefineEffectRight = EFFECT_REFINED +  EFFECT_SWORD_REFINED_SPECIAL1; //effect 24 sword effect
            }
        }

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


×
×
  • 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.