summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c3
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/skill.c7
-rw-r--r--src/map/unit.c4
4 files changed, 9 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 4b39e07af..5d4bcc457 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4219,9 +4219,8 @@ int clif_skillup(struct map_session_data *sd,int skill_num)
*------------------------------------------
*/
int clif_skillcasting(struct block_list* bl,
- int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int casttime)
+ int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int pl, int casttime)
{
- int pl = skill_get_pl(skill_num, 1); //TODO: Need Skill level here :/
unsigned char buf[32];
WBUFW(buf,0) = 0x13e;
WBUFL(buf,2) = src_id;
diff --git a/src/map/clif.h b/src/map/clif.h
index 770da02b1..c9e48c986 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -171,7 +171,7 @@ int clif_skillinfoblock(struct map_session_data *sd);
int clif_skillup(struct map_session_data *sd,int skill_num);
int clif_skillcasting(struct block_list* bl,
- int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int casttime);
+ int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int pl, int casttime);
int clif_skillcastcancel(struct block_list* bl);
int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype);
int clif_skill_damage(struct block_list *src,struct block_list *dst,
diff --git a/src/map/skill.c b/src/map/skill.c
index 45bc7abd0..5c77f186a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7028,8 +7028,11 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned
break;
case UNT_MOONLIT:
//Knockback out of area if affected char isn't in Moonlit effect
- if (!sc || sc->data[SC_DANCING].timer==-1 || (sc->data[SC_DANCING].val1&0xFFFF) != CG_MOONLIT)
- skill_blown(ss, bl, skill_get_blewcount(sg->skill_id,sg->skill_lv));
+ if (sc && sc->data[SC_DANCING].timer!=-1 && (sc->data[SC_DANCING].val1&0xFFFF) == CG_MOONLIT)
+ break;
+ if (ss == bl) //Also needed to prevent infinite loop crash.
+ break;
+ skill_blown(ss, bl, skill_get_blewcount(sg->skill_id,sg->skill_lv));
break;
}
return skillid;
diff --git a/src/map/unit.c b/src/map/unit.c
index 9a48dc488..0cfdd9087 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -980,7 +980,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
if( casttime>0 || temp){
- clif_skillcasting(src, src->id, target_id, 0,0, skill_num,casttime);
+ clif_skillcasting(src, src->id, target_id, 0,0, skill_num, skill_get_pl(skill_num, skill_lv), casttime);
if (sd && target->type == BL_MOB)
{
@@ -1114,7 +1114,7 @@ int unit_skilluse_pos2( struct block_list *src, int skill_x, int skill_y, int sk
if( casttime>0 ) {
unit_stop_walking( src, 1);
- clif_skillcasting(src, src->id, 0, skill_x,skill_y, skill_num,casttime);
+ clif_skillcasting(src, src->id, 0, skill_x, skill_y, skill_num, skill_get_pl(skill_num, skill_lv), casttime);
} else
ud->state.skillcastcancel=0;