diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-22 06:37:36 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-22 06:37:36 +0000 |
commit | 145df89a504427fb4f8c69c0eb155ec4f0fc5841 (patch) | |
tree | e96a1298b1023fd2a0836cb5523c6230e952c096 /src | |
parent | 1fdd9051b6ae3a72d43bfb2f490710f9a7b2eaf0 (diff) | |
download | hercules-145df89a504427fb4f8c69c0eb155ec4f0fc5841.tar.gz hercules-145df89a504427fb4f8c69c0eb155ec4f0fc5841.tar.bz2 hercules-145df89a504427fb4f8c69c0eb155ec4f0fc5841.tar.xz hercules-145df89a504427fb4f8c69c0eb155ec4f0fc5841.zip |
Fixed the damn broken combo code. Fixed Fallen Empire and Dragon Combo (part of bugreport:5358) and applied some more of my curly brace love.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15758 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 18 | ||||
-rw-r--r-- | src/map/status.c | 8 | ||||
-rw-r--r-- | src/map/unit.c | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 78b35a0b0..b93a40144 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2158,15 +2158,13 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds if(sd) { int flag = 0; //Used to signal if this skill can be combo'ed later on. struct status_change_entry *sce; - if ((sce = sd->sc.data[SC_COMBO])) - { //End combo state after skill is invoked. [Skotlex] + if ((sce = sd->sc.data[SC_COMBO])) {//End combo state after skill is invoked. [Skotlex] switch (skillid) { case TK_TURNKICK: case TK_STORMKICK: case TK_DOWNKICK: case TK_COUNTER: - if (pc_famerank(sd->status.char_id,MAPID_TAEKWON)) - { //Extend combo time. + if (pc_famerank(sd->status.char_id,MAPID_TAEKWON)) {//Extend combo time. sce->val1 = skillid; //Update combo-skill sce->val3 = skillid; if( sce->timer != INVALID_TIMER ) @@ -2181,8 +2179,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds status_change_end(src, SC_COMBO, INVALID_TIMER); } } - switch(skillid) - { + switch(skillid) { case MO_TRIPLEATTACK: if (pc_checkskill(sd, MO_CHAINCOMBO) > 0 || pc_checkskill(sd, SR_DRAGONCOMBO) > 0) flag=1; @@ -2239,9 +2236,6 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds if (flag) { //Possible to chain flag = DIFF_TICK(sd->ud.canact_tick, tick); if (flag < 1) flag = 1; - // Dragon Combo must change into self skill and auto-select target when used as combo skill. - if( skillid == MO_TRIPLEATTACK && pc_checkskill(sd, SR_DRAGONCOMBO) > 0 ) - clif_skillinfo(sd,SR_DRAGONCOMBO,INF_SELF_SKILL); sc_start2(src,SC_COMBO,100,skillid,bl->id,flag); clif_combo_delay(src, flag); } @@ -4170,8 +4164,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int skill_addtimerskill(src, tick + status_get_amotion(src)*8/10, bl->id, 0, 0, skillid, skilllv, BF_WEAPON, flag|SD_LEVEL); break; case SR_DRAGONCOMBO: - if( sd ) // Dragon Combo must back to target-selectable skill after use it as combo. - clif_skillinfo(sd,SR_DRAGONCOMBO,0); skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); break; @@ -8205,8 +8197,8 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data) inf2 = skill_get_inf2(ud->skillid); if(inf&INF_ATTACK_SKILL || - (inf&INF_SELF_SKILL && inf2&INF2_NO_TARGET_SELF) || //Combo skills - (ud->skillid == SR_DRAGONCOMBO && src == target) ) // Casted through combo. + (inf&INF_SELF_SKILL && inf2&INF2_NO_TARGET_SELF) //Combo skills + ) // Casted through combo. inf = BCT_ENEMY; //Offensive skill. else if(inf2&INF2_NO_ENEMY) inf = BCT_NOENEMY; diff --git a/src/map/status.c b/src/map/status.c index 17dcc258f..ed67421a0 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8058,6 +8058,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val if (sd) clif_skillinfo(sd,TK_JUMPKICK, INF_SELF_SKILL); break; + case MO_TRIPLEATTACK: + if (sd && pc_checkskill(sd, SR_DRAGONCOMBO) > 0) + clif_skillinfo(sd,SR_DRAGONCOMBO, INF_SELF_SKILL); + break; } break; case SC_RAISINGDRAGON: @@ -8424,6 +8428,10 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const case TK_JUMPKICK: clif_skillinfo(sd, TK_JUMPKICK, 0); break; + case MO_TRIPLEATTACK: + if (pc_checkskill(sd, SR_DRAGONCOMBO) > 0) + clif_skillinfo(sd, SR_DRAGONCOMBO, 0); + break; } break; diff --git a/src/map/unit.c b/src/map/unit.c index f6ef79e56..39480867d 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1014,7 +1014,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh //temp: used to signal combo-skills right now. if (sc && sc->data[SC_COMBO] && (sc->data[SC_COMBO]->val1 == skill_num || - skill_num == MO_EXTREMITYFIST || skill_num == SR_DRAGONCOMBO )) { + (sd?skill_check_condition_castbegin(sd,skill_num,skill_lv):0) )) { if (sc->data[SC_COMBO]->val2) target_id = sc->data[SC_COMBO]->val2; else |