diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-10-07 21:35:12 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-10-07 21:35:12 +0000 |
commit | 033373a5a75599f8607107cb28b97cc6a653b0b5 (patch) | |
tree | c520e925018ac7de37d05f690d357fcf55b56ec4 /src/map/unit.c | |
parent | 692dd1e5737b01ef26ba889f60d013cb992c3cec (diff) | |
download | hercules-033373a5a75599f8607107cb28b97cc6a653b0b5.tar.gz hercules-033373a5a75599f8607107cb28b97cc6a653b0b5.tar.bz2 hercules-033373a5a75599f8607107cb28b97cc6a653b0b5.tar.xz hercules-033373a5a75599f8607107cb28b97cc6a653b0b5.zip |
* Merged changes from trunk [14895:14966/trunk].
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14967 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 31 |
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) |