Jump to content

Costume Weapon bonus


Recommended Posts

Hi all!

 

I have a question ...

 

How can I set costume weapons  to receive a random bonus like other costumes?

 

i try this but its no solution:

void CItem::AlterToMagicItem()
{
    int idx = GetAttributeSetIndex();

    if (idx < 0)
        return;

    //      Appeariance Second Third
    // Weapon 50        20     5
    // Armor  30        10     2
    // Acc    20        10     1

    int iSecondPct;
    int iThirdPct;

    if (g_iUseLocale)
    {
        switch (GetType())
        {
            case ITEM_WEAPON:
                iSecondPct = 20;
                iThirdPct = 5;
                break;

            case ITEM_ARMOR:
            case ITEM_COSTUME:
                if (GetSubType() == ARMOR_BODY)
                {
                    iSecondPct = 10;
                    iThirdPct = 2;
                }
                else if (GetType() == ITEM_COSTUME && (GetSubType() == COSTUME_WEAPON_SWORD || GetSubType() == COSTUME_WEAPON_DAGGER || GetSubType() == COSTUME_WEAPON_BOW || GetSubType() == COSTUME_WEAPON_TWO_HANDED || GetSubType() == COSTUME_WEAPON_BELL || GetSubType() == COSTUME_WEAPON_FAN))
                {
                    iSecondPct = 8;
                    iThirdPct = 1;
                }
                else
                {
                    iSecondPct = 10;
                    iThirdPct = 1;
                }
                break;

            default:
                return;
        }
    }
    else
    {
        switch (GetType())
        {
            case ITEM_WEAPON:
                iSecondPct = 30;
                iThirdPct = 15;
                break;

            case ITEM_ARMOR:
            case ITEM_COSTUME:
                if (GetSubType() == ARMOR_BODY)
                {
                    iSecondPct = 20;
                    iThirdPct = 10;
                }
                else if (GetType() == ITEM_COSTUME && (GetSubType() == COSTUME_WEAPON_SWORD || GetSubType() == COSTUME_WEAPON_DAGGER || GetSubType() == COSTUME_WEAPON_BOW || GetSubType() == COSTUME_WEAPON_TWO_HANDED || GetSubType() == COSTUME_WEAPON_BELL || GetSubType() == COSTUME_WEAPON_FAN))
                {
                    iSecondPct = 8;
                    iThirdPct = 1;
                }
                else
                {
                    iSecondPct = 10;
                    iThirdPct = 5;
                }
                break;

            default:
                return;
        }
    }

    // 100% Č®·ü·Î ÁÁŔş ĽÓĽş ÇĎłŞ
    PutAttribute(aiItemMagicAttributePercentHigh);

    if (number(1, 100) <= iSecondPct)
        PutAttribute(aiItemMagicAttributePercentLow);

    if (number(1, 100) <= iThirdPct)
        PutAttribute(aiItemMagicAttributePercentLow);
}

sry my bad eng

Link to comment
Share on other sites

  • 3 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.