Fixes a crash non-player objects and timed skills (#5117)

* Fixes #5110.
* Fixes a potential map server crash when non-player objects attempt to use Chain Lightning, Tetra Vortex, or Flash Combo and are kill during duration.
Thanks to @Hope8888!
This commit is contained in:
Aleos 2020-06-29 10:04:12 -04:00 committed by GitHub
parent 005a2c4f48
commit f8721de7c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4221,6 +4221,8 @@ static TIMER_FUNC(skill_timerskill){
case SR_FALLENEMPIRE:
case SR_TIGERCANNON:
case SR_SKYNETBLOW:
if (src->type != BL_PC)
continue;
break; // Exceptions
default:
continue; // Caster is Dead
@ -4497,6 +4499,8 @@ int skill_cleartimerskill (struct block_list *src)
case SR_FALLENEMPIRE:
case SR_TIGERCANNON:
case SR_SKYNETBLOW:
if (src->type != BL_PC)
break;
continue;
}
delete_timer(ud->skilltimerskill[i]->timer, skill_timerskill);