summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-20 08:22:52 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-20 08:22:52 +0000
commit6f700c626efe9253ce77865667d1d5e598daab65 (patch)
tree39181382b553076654fe401c9e8d6116f81852d9 /src
parente0812d1de5710c08e5242e0a958e675d1bce0829 (diff)
downloadhercules-6f700c626efe9253ce77865667d1d5e598daab65.tar.gz
hercules-6f700c626efe9253ce77865667d1d5e598daab65.tar.bz2
hercules-6f700c626efe9253ce77865667d1d5e598daab65.tar.xz
hercules-6f700c626efe9253ce77865667d1d5e598daab65.zip
* Changed Asura Strike/Jump Kick to target skill to get rid of the "target delay". (bugreport:2174)
- skill tree will be re-sent on status change to handle using these two skills during combo. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13900 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c49
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/status.c28
-rw-r--r--src/map/unit.c8
5 files changed, 39 insertions, 50 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 7a16ab73b..660beeb92 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3931,7 +3931,7 @@ int clif_insight(struct block_list *bl,va_list ap)
/*==========================================
*
- *------------------------------------------*/
+ *------------------------------------------
int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range)
{
int fd,id;
@@ -3963,7 +3963,7 @@ int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range)
WFIFOSET(fd,packet_len(0x147));
return 0;
-}
+}*/
/*==========================================
* スキルリストを送信する
@@ -3985,7 +3985,10 @@ int clif_skillinfoblock(struct map_session_data *sd)
if( (id = sd->status.skill[i].id) != 0 )
{
WFIFOW(fd,len) = id;
- WFIFOW(fd,len+2) = skill_get_inf(id);
+ if( (id == MO_EXTREMITYFIST && sd->state.combo&1) || (id == TK_JUMPKICK && sd->state.combo&2) )
+ WFIFOW(fd,len+2) = INF_SELF_SKILL;
+ else
+ WFIFOW(fd,len+2) = skill_get_inf(id);
WFIFOW(fd,len+4) = 0;
WFIFOW(fd,len+6) = sd->status.skill[i].lv;
WFIFOW(fd,len+8) = skill_get_sp(id,sd->status.skill[i].lv);
@@ -9471,7 +9474,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
if( skillnotok(skillnum, sd) )
return;
- if( sd->bl.id != target_id && !sd->state.skill_flag && tmp&INF_SELF_SKILL )
+ if( sd->bl.id != target_id && (tmp&INF_SELF_SKILL || sd->state.combo) )
target_id = sd->bl.id; // never trust the client
if( target_id < 0 && -target_id == sd->bl.id ) // for disguises [Valaris]
@@ -9515,41 +9518,6 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
}
sd->skillitem = sd->skillitemlv = 0;
- if( skillnum == MO_EXTREMITYFIST )
- {
- if( (!sd->sc.data[SC_COMBO] ||
- (sd->sc.data[SC_COMBO]->val1 != MO_COMBOFINISH &&
- sd->sc.data[SC_COMBO]->val1 != CH_TIGERFIST &&
- sd->sc.data[SC_COMBO]->val1 != CH_CHAINCRUSH))) {
- if( !sd->state.skill_flag )
- {
- sd->state.skill_flag = 1;
- clif_skillinfo(sd, MO_EXTREMITYFIST, INF_ATTACK_SKILL, -1);
- return;
- } else if( sd->bl.id == target_id )
- {
- clif_skillinfo(sd, MO_EXTREMITYFIST, INF_ATTACK_SKILL, -1);
- return;
- }
- }
- }
- if( skillnum == TK_JUMPKICK )
- {
- if( !sd->sc.data[SC_COMBO] || sd->sc.data[SC_COMBO]->val1 != TK_JUMPKICK )
- {
- if( !sd->state.skill_flag )
- {
- sd->state.skill_flag = 1;
- clif_skillinfo(sd, TK_JUMPKICK, INF_ATTACK_SKILL, -1);
- return;
- }
- else if( sd->bl.id == target_id )
- {
- clif_skillinfo(sd, TK_JUMPKICK, INF_ATTACK_SKILL, -1);
- return;
- }
- }
- }
if( skillnum >= GD_SKILLBASE )
{
@@ -9569,9 +9537,6 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd)
if( skilllv )
unit_skilluse_id(&sd->bl, target_id, skillnum, skilllv);
-
- if( sd->state.skill_flag )
- sd->state.skill_flag = 0;
}
/*==========================================
diff --git a/src/map/pc.h b/src/map/pc.h
index 1484f9dc2..3d09ebcbe 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -89,7 +89,7 @@ struct map_session_data {
unsigned lr_flag : 2;
unsigned connect_new : 1;
unsigned arrow_atk : 1;
- unsigned skill_flag : 1;
+ unsigned combo : 2; // 1:Asura, 2:Kick [Inkfish]
unsigned gangsterparadise : 1;
unsigned rest : 1;
unsigned storage_flag : 2; //0: closed, 1: Normal Storage open, 2: guild storage open [Skotlex]
diff --git a/src/map/skill.c b/src/map/skill.c
index ef3b65dac..47ec44abc 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8270,7 +8270,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
return 0;
}
}
- if( !unit_can_move(&sd->bl) )
+ else if( !unit_can_move(&sd->bl) )
{ //Placed here as ST_MOVE_ENABLE should not apply if rooted or on a combo. [Skotlex]
clif_skill_fail(sd,skill,0,0);
return 0;
diff --git a/src/map/status.c b/src/map/status.c
index 467626106..2955520c6 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -5668,6 +5668,22 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case TK_COUNTER:
clif_skill_nodamage(bl,bl,TK_READYCOUNTER,1,1);
break;
+ case MO_COMBOFINISH:
+ case CH_TIGERFIST:
+ case CH_CHAINCRUSH:
+ if( sd )
+ {
+ sd->state.combo = 1;
+ clif_skillinfoblock(sd);
+ }
+ break;
+ case TK_JUMPKICK:
+ if( sd )
+ {
+ sd->state.combo = 2;
+ clif_skillinfoblock(sd);
+ }
+ break;
}
if (ud && !val3)
{
@@ -6497,8 +6513,16 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
}
break;
case SC_COMBO: //Clear last used skill when it is part of a combo.
- if (sd && sd->skillid_old == sce->val1)
- sd->skillid_old = sd->skilllv_old = 0;
+ if( sd )
+ {
+ if( sd->state.combo )
+ {
+ sd->state.combo = 0;
+ clif_skillinfoblock(sd);
+ }
+ if( sd->skillid_old == sce->val1 )
+ sd->skillid_old = sd->skilllv_old = 0;
+ }
break;
case SC_MARIONETTE:
diff --git a/src/map/unit.c b/src/map/unit.c
index 116b8c3d5..3d15ba6c8 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -844,10 +844,10 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
sc = status_get_sc(src);
if (sc && !sc->count)
sc = NULL; //Unneeded
+
//temp: used to signal combo-skills right now.
- temp = (target_id == src->id && !(sd && sd->state.skill_flag)
- && skill_get_inf(skill_num)&INF_SELF_SKILL
- && skill_get_inf2(skill_num)&INF2_NO_TARGET_SELF);
+ temp = ( target_id == src->id &&
+ ( (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]
@@ -961,7 +961,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
if( ((TBL_MOB*)src)->master_id && ((TBL_MOB*)src)->special_state.ai )
return 0;
}
-
+
//Check range when not using skill on yourself or is a combo-skill during attack
//(these are supposed to always have the same range as your attack)
if( src->id != target_id && (!temp || ud->attacktimer == -1) )