Jump to content
  • 0

Status Bug (Freeze, Stun,Stone, etc)


xyxzero

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  90
  • Reputation:   6
  • Joined:  12/11/12
  • Last Seen:  

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?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  513
  • Reputation:   83
  • Joined:  08/11/12
  • Last Seen:  

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.
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  90
  • Reputation:   6
  • Joined:  12/11/12
  • Last Seen:  

Thank you @Ninja

Link to comment
Share on other sites

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.

×
×
  • Create New...