summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-22 06:37:36 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-22 06:37:36 +0000
commit145df89a504427fb4f8c69c0eb155ec4f0fc5841 (patch)
treee96a1298b1023fd2a0836cb5523c6230e952c096 /src/map/skill.c
parent1fdd9051b6ae3a72d43bfb2f490710f9a7b2eaf0 (diff)
downloadhercules-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/map/skill.c')
-rw-r--r--src/map/skill.c18
1 files changed, 5 insertions, 13 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;