summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index cffb97b1f..c8b0e0d26 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -912,7 +912,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
struct map_session_data *sd = NULL;
struct block_list * target = NULL;
unsigned int tick = gettick();
- int temp;
+ int temp = 0;
nullpo_ret(src);
if(status_isdead(src))
@@ -927,14 +927,21 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
sc = NULL; //Unneeded
//temp: used to signal combo-skills right now.
- temp = ( target_id == src->id &&
- (
- ( !(skill_get_inf(skill_num)&INF_SELF_SKILL) && sd && sd->state.combo ) ||
- ( skill_get_inf(skill_num)&INF_SELF_SKILL && skill_get_inf2(skill_num)&INF2_NO_TARGET_SELF )
- )
- );
- if (temp)
- target_id = ud->target; //Auto-select skills. [Skotlex]
+ if (sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == skill_num)
+ {
+ if (sc->data[SC_COMBO]->val2)
+ target_id = sc->data[SC_COMBO]->val2;
+ else
+ target_id = ud->target;
+ temp = 1;
+ } else
+ if ( target_id == src->id &&
+ skill_get_inf(skill_num)&INF_SELF_SKILL &&
+ skill_get_inf2(skill_num)&INF2_NO_TARGET_SELF )
+ {
+ target_id = ud->target; //Auto-select target. [Skotlex]
+ temp = 1;
+ }
if (sd) {
//Target_id checking.
@@ -949,12 +956,6 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
return 0;
}
break;
- case TK_JUMPKICK:
- case TK_COUNTER:
- case HT_POWER:
- if (sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == skill_num)
- target_id = sc->data[SC_COMBO]->val2;
- break;
case WE_MALE:
case WE_FEMALE:
if (!sd->status.partner_id)