소스 검색

* 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://svn.code.sf.net/p/rathena/svn/trunk@13900 54d463be-8e91-2dee-dedb-b68131a5f0ec

Inkfish 16 년 전
부모
커밋
e447a8a92a
7개의 변경된 파일43개의 추가작업 그리고 52개의 파일을 삭제
  1. 2 0
      Changelog-Trunk.txt
  2. 2 2
      db/skill_db.txt
  3. 7 42
      src/map/clif.c
  4. 1 1
      src/map/pc.h
  5. 1 1
      src/map/skill.c
  6. 26 2
      src/map/status.c
  7. 4 4
      src/map/unit.c

+ 2 - 0
Changelog-Trunk.txt

@@ -3,6 +3,8 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+09/06/20
+	* Changed Asura Strike/Jump Kick to target skill to get rid of the "target delay". (bugreport:2174) [Inkfish]
 09/06/19
 	* Implemented script command "areamobuseskill" and skill NPC_INVINCIBLE and NPC_INVINCIBLEOFF. (topic:217330) [Inkfish]
 	* Using items no longer cancels invincibility(but using target and ground skills through items does). (bugreport:3259) [Inkfish]

+ 2 - 2
db/skill_db.txt

@@ -313,7 +313,7 @@
 268,0,6,4,0,0x1,0,5,1,no,0,0,0,weapon,0,		MO_STEELBODY,Mental Strength
 269,0,6,4,0,0x1,0,5,1,no,0,0,0,weapon,0,		MO_BLADESTOP,Root
 270,0,6,4,0,0x1,0,5,0,no,0,0,0,weapon,0,		MO_EXPLOSIONSPIRITS,Fury
-271,-2,6,4,0,0x60,0,5,1,yes,0,0x200,0,weapon,0,	MO_EXTREMITYFIST,Asura Strike
+271,-2,6,1,0,0x60,0,5,1,yes,0,0,0,weapon,0,	MO_EXTREMITYFIST,Asura Strike
 272,-2,8,4,-1,0,0,5,-4,no,0,0x200,0,weapon,0,	MO_CHAINCOMBO,Raging Quadruple Blow
 273,-2,6,4,-1,0x2,2,5,1,no,0,0x200,0,weapon,0,	MO_COMBOFINISH,Raging Thrust
 274,0,0,0,0,0,0,10,0,no,0,0,0,weapon,0,		SA_ADVANCEDBOOK,Study
@@ -463,7 +463,7 @@
 418,0,6,4,0,0x1,0,1,1,no,0,0,0,weapon,0,		TK_READYCOUNTER,Counter Kick Stance
 419,-2,8,4,-1,0x40,0,7,-3,no,0,0x200,0,weapon,0,	TK_COUNTER,Counter Kick
 420,0,6,4,0,0x1,0,1,1,no,0,0,0,weapon,0,		TK_DODGE,Tumbling
-421,9,8,4,-1,0,0,7,-3,no,0,0x200,0,weapon,0,	TK_JUMPKICK,Flying Kick
+421,9,8,1,-1,0,0,7,-3,no,0,0,0,weapon,0,	TK_JUMPKICK,Flying Kick
 422,0,0,0,0,0,1,10,0,no,0,0,0,none,0,		TK_HPTIME,Peaceful Break
 423,0,0,0,0,0,1,10,0,no,0,0,0,none,0,		TK_SPTIME,Happy Break
 424,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,		TK_POWER,Kihop

+ 7 - 42
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;
 }
 
 /*==========================================

+ 1 - 1
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]

+ 1 - 1
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;

+ 26 - 2
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:

+ 4 - 4
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) )