diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index 73b3b6e89..377785fe4 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7571,6 +7571,14 @@ int buildin_sc_start(struct script_state *st) tick/=2; //Thrown potions only last half. val4 = 1; //Mark that this was a thrown sc_effect } + if (type >= 0 && type < SC_MAX && val1 && !tick) + { //When there isn't a duration specified, try to get it from the skill_db + tick = StatusSkillChangeTable[type]; + if (tick) + tick = skill_get_time(tick,val1); + else //Failed to retrieve duration, reset to what it was. + tick = 0; + } if (bl) status_change_start(bl,type,10000,val1,0,0,val4,tick,11); return 0; @@ -7593,6 +7601,15 @@ int buildin_sc_start2(struct script_state *st) else bl = map_id2bl(st->rid); + if (type >= 0 && type < SC_MAX && val1 && !tick) + { //When there isn't a duration specified, try to get it from the skill_db + tick = StatusSkillChangeTable[type]; + if (tick) + tick = skill_get_time(tick,val1); + else //Failed to retrieve duration, reset to what it was. + tick = 0; + } + if (potion_flag==1 && potion_target) { bl = map_id2bl(potion_target); tick/=2; @@ -7625,6 +7642,15 @@ int buildin_sc_start4(struct script_state *st) else bl = map_id2bl(st->rid); + if (type >= 0 && type < SC_MAX && val1 && !tick) + { //When there isn't a duration specified, try to get it from the skill_db + tick = StatusSkillChangeTable[type]; + if (tick) + tick = skill_get_time(tick,val1); + else //Failed to retrieve duration, reset to what it was. + tick = 0; + } + if (potion_flag==1 && potion_target) { bl = map_id2bl(potion_target); tick/=2; |