Fixed hells plant on warping

Thanks to @limitro
This commit is contained in:
Lemongrass3110 2021-07-02 01:02:02 +02:00
parent d223f0c31e
commit db7075ecb2
2 changed files with 28 additions and 18 deletions

View File

@ -6253,20 +6253,30 @@ void clif_efst_status_change_sub(struct block_list *tbl, struct block_list *bl,
if (td)
tick = DIFF_TICK(td->tick, gettick());
if( spheres_sent && type >= SC_SPHERE_1 && type <= SC_SPHERE_5 ){
#if PACKETVER > 20120418
clif_efst_status_change(tbl, bl->id, AREA_WOS, StatusIconChangeTable[type], tick, sc_display[i]->val1, sc_display[i]->val2, sc_display[i]->val3);
#else
clif_status_change_sub(tbl, bl->id, StatusIconChangeTable[type], 1, tick, sc_display[i]->val1, sc_display[i]->val2, sc_display[i]->val3, AREA_WOS);
#endif
}else{
// Status changes that need special handling
switch( type ){
case SC_SPHERE_1:
case SC_SPHERE_2:
case SC_SPHERE_3:
case SC_SPHERE_4:
case SC_SPHERE_5:
if( spheres_sent ){
target = AREA_WOS;
}
break;
case SC_HELLS_PLANT:
if( sc && sc->data[type] ){
tick = sc->data[type]->val4;
}
break;
}
#if PACKETVER > 20120418
clif_efst_status_change(tbl, bl->id, target, StatusIconChangeTable[type], tick, sc_display[i]->val1, sc_display[i]->val2, sc_display[i]->val3);
#else
clif_status_change_sub(tbl, bl->id, StatusIconChangeTable[type], 1, tick, sc_display[i]->val1, sc_display[i]->val2, sc_display[i]->val3, target);
#endif
}
}
}
/// Notifies the client when a player enters the screen with an active EFST.

View File

@ -8973,6 +8973,8 @@ static int status_get_sc_interval(enum sc_type type)
case SC_BLEEDING:
case SC_TOXIN:
return 10000;
case SC_HELLS_PLANT:
return 333;
case SC_SHIELDSPELL_HP:
return 3000;
case SC_SHIELDSPELL_SP:
@ -11804,8 +11806,8 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
tick_time = 3000;
break;
case SC_HELLS_PLANT:
tick_time = 333;
val4 = tick / tick_time;
tick_time = status_get_sc_interval(type);
val4 = tick - tick_time; // Remaining time
break;
case SC_SWINGDANCE:
val3 = 3 * val1 + val2; // Walk speed and aspd reduction.
@ -14775,10 +14777,8 @@ TIMER_FUNC(status_change_timer){
}
case SC_HELLS_PLANT:
if (--(sce->val4) > 0) {
skill_castend_damage_id(bl, bl, GN_HELLS_PLANT_ATK, sce->val1, tick, 0);
sc_timer_next(333 + tick);
return 0;
if( sce->val4 >= 0 ){
skill_castend_damage_id( bl, bl, GN_HELLS_PLANT_ATK, sce->val1, tick, 0 );
}
break;