Skip to content

Commit

Permalink
Resolved some map blocks not getting freed
Browse files Browse the repository at this point in the history
* Fixes Bio Explosion, Suicide Bombing, and Summon Legion not properly freeing map blocks.
Thanks to @Tokeiburu!
  • Loading branch information
aleos89 committed May 23, 2016
1 parent 631187b commit cc30d9d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/map/skill.c
Expand Up @@ -6905,8 +6905,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
skill_get_splash(skill_id, skill_lv), BL_CHAR|BL_SKILL,
src, skill_id, skill_lv, tick, flag|i,
skill_castend_damage_id);
if(map_addblock(src))
if(map_addblock(src)) {
map_freeblock_unlock();
return 1;
}
status_damage(src, src, sstatus->max_hp,0,0,1);
break;

Expand Down Expand Up @@ -10632,7 +10634,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui

int maxcount = qty[skill_lv-1];
i_slave = map_foreachinmap(skill_check_condition_mob_master_sub ,hd->bl.m, BL_MOB, hd->bl.id, summons[skill_lv-1], skill_id, &c);
if(c >= maxcount) return 0; //max qty already spawned
if(c >= maxcount) {
map_freeblock_unlock();
return 0; //max qty already spawned
}

for(i_slave=0; i_slave<qty[skill_lv - 1]; i_slave++){ //easy way
sum_md = mob_once_spawn_sub(src, src->m, src->x, src->y, status_get_name(src), summons[skill_lv - 1], "", SZ_SMALL, AI_ATTACK);
Expand Down

0 comments on commit cc30d9d

Please sign in to comment.