xyxzero Posted August 29, 2018 Posted August 29, 2018 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? Quote
0 Ninja Posted August 29, 2018 Posted August 29, 2018 (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 August 29, 2018 by Ninja it is better to do it in status_get_sc_def for a more standardized approach. Quote
Question
xyxzero
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.