Jump to content

Recommended Posts

Hello,

I'm currently working with the following system:

 

#define ENABLE_BOOST_BONUS_RACE
#ifdef ENABLE_BOOST_BONUS_RACE
        if (GetJob() == JOB_WARRIOR && GetSkillGroup() == 2) // Mental Warrior
        {
            SetPoint(POINT_ATTBONUS_MONSTER, GetPoint(POINT_ATTBONUS_MONSTER) + 10); //Strong against monsters +10%
        }
        if (GetJob() == JOB_SURA && GetSkillGroup() == 2) // Black Sura
        {
            SetPoint(POINT_ATTBONUS_MONSTER, GetPoint(POINT_ATTBONUS_MONSTER) + 10); //Strong against monsters +10%
        }
        if (GetJob() == JOB_SHAMAN) // Shaman
        {
            SetPoint(POINT_ATTBONUS_MONSTER, GetPoint(POINT_ATTBONUS_MONSTER) + 10); //Strong against monsters +10%
        }
        if (GetJob() == JOB_ASSASSIN) // Ninja
        {
            SetPoint(POINT_ATTBONUS_MONSTER, GetPoint(POINT_ATTBONUS_MONSTER) + 10); //Strong against monsters +10%
        }
#endif
 

Right now, the bonus is applied only once when the character is first created. However, I'm trying to find a way to reapply or update the bonus every time the character logs in, based on their current job and skill group.

The goal is to ensure that:

If the character changes race or skill group, the bonus is updated accordingly.

If a character was created before the system was implemented, they also receive the bonus on their next login.

Bonuses must not stack or duplicate over multiple logins.

I may want to add multiple types of bonuses, such as +10% Strong against Metin Stones, but again, these must not overlap or stack with previous bonuses.

I’m considering moving the bonus logic into the Login function, or any reliable hook that is triggered on every login, and managing bonus state updates carefully to avoid duplication.

Do you have any advice or suggestions on the best way to implement this?

 

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.