diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/skill.c | 43 | ||||
-rw-r--r-- | src/map/unit.c | 2 |
2 files changed, 35 insertions, 10 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 69c700d95..a3c77829e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2791,15 +2791,15 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int } break; - case KN_CHARGEATK: case MO_EXTREMITYFIST: - if (skillid == MO_EXTREMITYFIST && sc && sc->count) + if (sc && sc->count) { if (sc->data[SC_EXPLOSIONSPIRITS].timer != -1) status_change_end(src, SC_EXPLOSIONSPIRITS, -1); if (sc->data[SC_BLADESTOP].timer != -1) status_change_end(src,SC_BLADESTOP,-1); } + case KN_CHARGEATK: if(!check_distance_bl(src, bl, 2)) { //Need to move to target. int dx,dy; @@ -2818,13 +2818,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int break; } clif_slide(src,src->x,src->y); - if (skillid != MO_EXTREMITYFIST || battle_check_target(src, bl, BCT_ENEMY) > 0) //Check must be done here because EF should be broken this way.. [Skotlex] - skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); - else if (sd) - clif_skill_fail(sd,skillid,0,0); - } - else //Assume minimum distance of 1 for Charge. - skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,skillid == KN_CHARGEATK?1:flag); + } else //Assume minimum distance of 1 for Charge. + flag = 1; + skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); break; //Splash attack skills. @@ -5714,7 +5710,6 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data) break; } } - //Avoid doing double checks for instant-cast skills. if (tid != -1 && !status_check_skilluse(src, target, ud->skillid, 1)) break; @@ -5777,6 +5772,34 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data) return 1; } while(0); //Skill failed. + if (ud->skillid == MO_EXTREMITYFIST && sd) + { //When Asura fails... + //Consume SP/spheres + skill_check_condition(sd,ud->skillid, ud->skilllv,1); + sc = &sd->sc; + if (sc->count) + { //End states + if (sc->data[SC_EXPLOSIONSPIRITS].timer != -1) + status_change_end(src, SC_EXPLOSIONSPIRITS, -1); + if (sc->data[SC_BLADESTOP].timer != -1) + status_change_end(src,SC_BLADESTOP,-1); + } + if (target && target->m == src->m) + { //Move character to target anyway. + int dx,dy; + dx = target->x - src->x; + dy = target->y - src->y; + if(dx > 0) dx++; + else if(dx < 0) dx--; + if (dy > 0) dy++; + else if(dy < 0) dy--; + + if (unit_movepos(src, src->x+dx, src->y+dy, 1, 1)) + clif_slide(src,src->x,src->y); + + clif_skill_fail(sd,ud->skillid,0,0); + } + } ud->skillid = ud->skilllv = ud->skilltarget = 0; ud->canact_tick = tick; if(sd) sd->skillitem = sd->skillitemlv = -1; diff --git a/src/map/unit.c b/src/map/unit.c index 063c9ac34..7eace7b06 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1628,6 +1628,8 @@ int unit_free(struct block_list *bl) { status_change_end(bl,SC_BERSERK,-1); if(sd->sc.data[SC_TRICKDEAD].timer!=-1) status_change_end(bl,SC_TRICKDEAD,-1); + if(sd->sc.data[SC_GUILDAURA].timer!=-1) + status_change_end(bl,SC_GUILDAURA,-1); if (battle_config.debuff_on_logout&1) { if(sd->sc.data[SC_ORCISH].timer!=-1) status_change_end(bl,SC_ORCISH,-1); |