Skip to content

Commit

Permalink
Fixed a mapcrash caused by SC_CLOUD_KILL
Browse files Browse the repository at this point in the history
Fixes #1462
Thanks to @Everade for reporting it to us.
  • Loading branch information
Lemongrass3110 committed Aug 2, 2016
1 parent 3af3c72 commit 5fabab9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/map/status.c
Expand Up @@ -12502,9 +12502,12 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
case SC_CLOUD_KILL: {
struct block_list *src = map_id2bl(sce->val2), *unit_bl = map_id2bl(sce->val3);

if (src && unit_bl)
if (src && unit_bl){
skill_attack(skill_get_type(status_sc2skill(type)), src, unit_bl, bl, SO_CLOUD_KILL, sce->val1, tick, 0);
sc_timer_next(500 + tick, status_change_timer, bl->id, data);

if( !status_isdead(bl) )
sc_timer_next(500 + tick, status_change_timer, bl->id, data);
}
}
break;

Expand Down

2 comments on commit 5fabab9

@julia40124009
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Lemongrass3110
still crash at line
sc_timer_next(500 + tick, status_change_timer, bl->id, data);

@aleos89
Copy link
Contributor

@aleos89 aleos89 commented on 5fabab9 Aug 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed. GM spawned monsters cause the map-server to crash while naturally spawning monsters don't.

Fixed in 99e49d9.

Please sign in to comment.