Cancel skill usage keeping on death (#5206)

Fixes #5058

Thanks to @admkakaroto and @qwerty7vp
This commit is contained in:
Lemongrass3110 2020-07-13 10:19:52 +02:00 committed by GitHub
parent b12cef18d2
commit afdd8d3897
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -8323,6 +8323,11 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
duel_reject(sd->duel_invite, sd);
}
if( sd->skill_keep_using.tid != INVALID_TIMER ){
delete_timer( sd->skill_keep_using.tid, skill_keep_using );
sd->skill_keep_using.tid = INVALID_TIMER;
}
pc_close_npc(sd,2); //close npc if we were using one
/* e.g. not killed thru pc_damage */

View File

@ -23141,6 +23141,7 @@ void do_init_skill(void)
add_timer_func_list(skill_castend_pos,"skill_castend_pos");
add_timer_func_list(skill_timerskill,"skill_timerskill");
add_timer_func_list(skill_blockpc_end, "skill_blockpc_end");
add_timer_func_list(skill_keep_using, "skill_keep_using");
add_timer_interval(gettick()+SKILLUNITTIMER_INTERVAL,skill_unit_timer,0,0,SKILLUNITTIMER_INTERVAL);
}