summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-05 03:46:19 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-05 03:46:19 +0000
commit2cd926a568df59089d202fd4bbf80a4100a8f891 (patch)
tree381ef2a667d6efba1217472fc52215c29a5f1f93 /src/map/skill.c
parentb26ca6871acc0ef2062668cfc9a0fcf7016e3ac1 (diff)
downloadhercules-2cd926a568df59089d202fd4bbf80a4100a8f891.tar.gz
hercules-2cd926a568df59089d202fd4bbf80a4100a8f891.tar.bz2
hercules-2cd926a568df59089d202fd4bbf80a4100a8f891.tar.xz
hercules-2cd926a568df59089d202fd4bbf80a4100a8f891.zip
More updates
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@447 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 8f711fd57..19e84d791 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4264,9 +4264,9 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
int skill_time = skill_get_time(skillid,skilllv);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_time,0 );
- if (bl->type == BL_MOB)
+ if (src->type == BL_MOB)
mob_changestate((struct mob_data *)src,MS_DELAY,skill_time);
- else if (bl->type == BL_PC)
+ else if (src->type == BL_PC)
sd->attackabletime = sd->canmove_tick = tick + skill_time;
}
break;
@@ -6023,7 +6023,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
if (sc_data[type].timer==-1)
skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
else if((unit2=(struct skill_unit *)sc_data[type].val2) && unit2 != src ){
- if( DIFF_TICK(sg->tick,unit2->group->tick)>0 )
+ if( unit2->group != 0 && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
ts->tick-=sg->interval;
}
@@ -6080,7 +6080,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
skill_status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
else if((unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
- if( DIFF_TICK(sg->tick,unit2->group->tick)>0 )
+ if( unit2->group != 0 && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
skill_status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
ts->tick-=sg->interval;
@@ -8926,8 +8926,9 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data)
if(!unit || !unit->group || unit->group->src_id==bl->id)
break;
skill_additional_effect(bl,bl,unit->group->skill_id,sc_data[type].val1,BF_LONG|BF_SKILL|BF_MISC,tick);
- sc_data[type].timer=add_timer(skill_get_time(unit->group->skill_id,unit->group->skill_lv)/10+tick,
- skill_status_change_timer, bl->id, data );
+ if (unit->group != 0)
+ sc_data[type].timer=add_timer(skill_get_time(unit->group->skill_id,unit->group->skill_lv)/10+tick,
+ skill_status_change_timer, bl->id, data );
return 0;
}
break;