Jump to content
  • 0

Status Bug (Freeze, Stun,Stone, etc)


Question

Posted

Code in status.cpp

 

case SC_FREEZE:
                    if (status->luk == 300)
                    return 0;
            sc_def = status->mdef*100;
            sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10;
            tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk
            break;
 

still gets frozen even luk is 300 

 

any help?

2 answers to this question

Recommended Posts

  • 0
Posted (edited)
2 hours ago, xyxzero said:

case SC_FREEZE:
                    if (status->luk == 300)
                    return 0;
            sc_def = status->mdef*100;
            sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10;
            tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk
            break;

Your code would only work IF AND ONLY IF the target has EXACTLY 300 luk. trying using >= instead of ==, also you have to add a check if the target is a player, else, any target, may it be a mob or a player will not be frozen if it has more than or equal to 300 luk.

case SC_FREEZE:
            if (bl->type == BL_PC && status->luk >= 300)
                    return 0;
            sc_def = status->mdef*100;
            sc_def2 = status->luk*10 + status_get_lv(bl)*10 - status_get_lv(src)*10;
            tick_def2 = status->luk*10 + status_src->luk*-10; // Caster can increase final duration with luk
            break;

 

Edited by Ninja
it is better to do it in status_get_sc_def for a more standardized approach.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...