Jump to content

Recommended Posts

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted (edited)

Now it absorb last 5 bonuses that are additionally added to the item but not the ones that already exist in the item.


The code i guess it might be a problem is 

#ifdef ENABLE_AURA_SYSTEM
    if ((GetType() == ITEM_COSTUME) && (GetSubType() == COSTUME_AURA) && (GetSocket(AURA_ABSORBED_SOCKET)))
    {
        TItemTable* pkItemAbsorbed = ITEM_MANAGER::instance().GetTable(GetSocket(AURA_ABSORBED_SOCKET));
        if (pkItemAbsorbed)
        {
            if ((pkItemAbsorbed->bType == ITEM_ARMOR) && ((pkItemAbsorbed->bSubType == ARMOR_SHIELD) || (pkItemAbsorbed->bSubType == ARMOR_HEAD)))
            {
                long lDefGrade = pkItemAbsorbed->alValues[1] + long(pkItemAbsorbed->alValues[5] * 2);
                double dValue = lDefGrade * (GetSocket(AURA_ABSORPTION_SOCKET));
                dValue = (double)dValue / 100;
                dValue = (double)dValue + .5;
                lDefGrade = (long)dValue;
                if (((pkItemAbsorbed->alValues[1] > 0) && (lDefGrade <= 0)) || ((pkItemAbsorbed->alValues[5] > 0) && (lDefGrade < 1)))
                    lDefGrade += 1;
                else if ((pkItemAbsorbed->alValues[1] > 0) || (pkItemAbsorbed->alValues[5] > 0))
                    lDefGrade += 1;

                m_pOwner->ApplyPoint(APPLY_DEF_GRADE_BONUS, bAdd ? lDefGrade : -lDefGrade);

                long lDefMagicBonus = pkItemAbsorbed->alValues[0];
                dValue = lDefMagicBonus * (GetSocket(AURA_ABSORPTION_SOCKET));
                dValue = (double)dValue / 100;
                dValue = (double)dValue + .5;
                lDefMagicBonus = (long)dValue;
                if ((pkItemAbsorbed->alValues[0] > 0) && (lDefMagicBonus < 1))
                    lDefMagicBonus += 1;
                else if (pkItemAbsorbed->alValues[0] > 0)
                    lDefMagicBonus += 1;

                m_pOwner->ApplyPoint(APPLY_MAGIC_DEF_GRADE, bAdd ? lDefMagicBonus : -lDefMagicBonus);
            }

Edited by shunp00452
Link to comment
https://metin2.dev/topic/34446-aura-absorb-problem/#findComment-175034
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

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.