summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index b5c01bf1d..6e36973ce 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6020,15 +6020,15 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
break;
case HP_BASILICA:
skill_clear_unitgroup(src);
- sg = skill_unitsetting(src,skillid,skilllv,x,y,0);
- sc_start(src,type,100,skilllv,skill_get_time(skillid,skilllv));
+ if ((sg = skill_unitsetting(src,skillid,skilllv,x,y,0)))
+ sc_start(src,type,100,skilllv,skill_get_time(skillid,skilllv));
flag|=1;
break;
case CG_HERMODE:
skill_clear_unitgroup(src);
- sg = skill_unitsetting(src,skillid,skilllv,x,y,0);
- sc_start4(src,SC_DANCING,100,
- skillid,0,skilllv,sg->group_id,skill_get_time(skillid,skilllv));
+ if ((sg = skill_unitsetting(src,skillid,skilllv,x,y,0)))
+ sc_start4(src,SC_DANCING,100,
+ skillid,0,skilllv,sg->group_id,skill_get_time(skillid,skilllv));
flag|=1;
break;
case RG_CLEANER: // [Valaris]
@@ -6172,8 +6172,8 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
break;
case HW_GRAVITATION:
- sg = skill_unitsetting(src,skillid,skilllv,x,y,0);
- sc_start4(src,type,100,skilllv,0,BCT_SELF,(int)sg,skill_get_time(skillid,skilllv));
+ if ((sg = skill_unitsetting(src,skillid,skilllv,x,y,0)))
+ sc_start4(src,type,100,skilllv,0,BCT_SELF,(int)sg,skill_get_time(skillid,skilllv));
flag|=1;
break;
@@ -6199,8 +6199,8 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
case SG_SUN_WARM:
case SG_MOON_WARM:
case SG_STAR_WARM:
- sg = skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
- sc_start4(src,type,100,skilllv,0,0,(int)sg,skill_get_time(skillid,skilllv));
+ if ((sg = skill_unitsetting(src,skillid,skilllv,src->x,src->y,0)))
+ sc_start4(src,type,100,skilllv,0,0,(int)sg,skill_get_time(skillid,skilllv));
flag|=1;
break;
@@ -6210,14 +6210,15 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
else
{
sg = skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
+ if (!sg) break;
if (sc && sc->data[type].timer != -1)
status_change_end(src,type,-1); //Was under someone else's Gospel. [Skotlex]
sc_start4(src,type,100,skilllv,0,(int)sg,BCT_SELF,skill_get_time(skillid,skilllv));
}
break;
case NJ_TATAMIGAESHI:
- sc_start(src,type,100,skilllv,skill_get_time2(skillid,skilllv));
- skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
+ if (skill_unitsetting(src,skillid,skilllv,src->x,src->y,0))
+ sc_start(src,type,100,skilllv,skill_get_time2(skillid,skilllv));
break;
case AM_CALLHOMUN: //[orn]