瀏覽代碼

* Extended ATF_SKILL to ATF_MAGIC and ATF_MISC.
* r13932 Fixed a wrong check on hp in Intimidate code. (bugreport:3305) (I forgot to write the message.)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13933 54d463be-8e91-2dee-dedb-b68131a5f0ec

Inkfish 16 年之前
父節點
當前提交
ab4ae85ca5
共有 5 個文件被更改,包括 14 次插入7 次删除
  1. 1 0
      Changelog-Trunk.txt
  2. 3 1
      db/const.txt
  3. 2 1
      src/map/map.h
  4. 1 1
      src/map/pc.c
  5. 7 4
      src/map/skill.c

+ 1 - 0
Changelog-Trunk.txt

@@ -6,6 +6,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 09/07/04
 	* TK_POWER shouldn't count the player him/herself for the skill. [Inkfish]
 	* Fixed a wrong check of Intimidate on hp. (bugreport:3305)[Inkfish]
+	* Extended ATF_SKILL to ATF_MAGIC and ATF_MISC. [Inkfish]
 09/07/03
 	* Martyr's Reckoning can be perfect dodged. [Inkfish]
 	* Casting Flying Kick while running and in the spurt status doubles the damage dealt without spurt status. (bugreport:1898) [Inkfish]

+ 3 - 1
db/const.txt

@@ -492,7 +492,9 @@ ATF_TARGET	0x02
 ATF_SHORT	0x04
 ATF_LONG	0x08
 ATF_WEAPON	0x10
-ATF_SKILL	0x20
+ATF_MAGIC	0x20
+ATF_MISC	0x40
+ATF_SKILL	0x60
 
 IG_BlueBox	1
 IG_VioletBox	2

+ 2 - 1
src/map/map.h

@@ -226,7 +226,8 @@ enum auto_trigger_flag {
 	ATF_SHORT=0x04,
 	ATF_LONG=0x08,
 	ATF_WEAPON=0x10,
-	ATF_SKILL=0x20,
+	ATF_MAGIC=0x20,
+	ATF_MISC=0x40,
 };
 
 struct block_list {

+ 1 - 1
src/map/pc.c

@@ -1487,7 +1487,7 @@ static int pc_bonus_addeff(struct s_addeffect* effect, int max, enum sc_type id,
 		flag|=ATF_SHORT|ATF_LONG; //Default range: both
 	if (!(flag&(ATF_TARGET|ATF_SELF)))
 		flag|=ATF_TARGET; //Default target: enemy.
-	if (!(flag&(ATF_WEAPON|ATF_SKILL)))
+	if (!(flag&(ATF_WEAPON|ATF_MAGIC|ATF_MISC)))
 		flag|=ATF_WEAPON; //Defatul type: weapon.
 
 	for (i = 0; i < max && effect[i].flag; i++) {

+ 7 - 4
src/map/skill.c

@@ -526,10 +526,13 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
 					rate += sd->addeff[i].arrow_rate;
 				if( !rate ) continue;
 
-				if( (sd->addeff[i].flag&(ATF_WEAPON|ATF_SKILL)) != (ATF_WEAPON|ATF_SKILL) )
-				{ // Trigger has attack type consideration.
-					if( (sd->addeff[i].flag&ATF_WEAPON && !(attack_type&BF_WEAPON)) || (sd->addeff[i].flag&ATF_SKILL && !(attack_type&(BF_MAGIC|BF_MISC))) )
-						continue;
+				if( (sd->addeff[i].flag&(ATF_WEAPON|ATF_MAGIC|ATF_MISC)) != (ATF_WEAPON|ATF_MAGIC|ATF_MISC) ) 
+				{ // Trigger has attack type consideration. 
+					if( (sd->addeff[i].flag&ATF_WEAPON && attack_type&BF_WEAPON) ||
+						(sd->addeff[i].flag&ATF_MAGIC && attack_type&BF_MAGIC) ||
+						(sd->addeff[i].flag&ATF_MISC && attack_type&BF_MISC) ) ;
+					else
+						continue; 
 				}
 
 				if( (sd->addeff[i].flag&(ATF_LONG|ATF_SHORT)) != (ATF_LONG|ATF_SHORT) )