diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-07-04 13:17:08 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-07-04 13:17:08 +0000 |
commit | 65d3824a9e6732760ce0e12201f8b856e097d08e (patch) | |
tree | 50d3a303149dd7c6f904166fb743d2d0a63dac87 /src/map | |
parent | adb0530acc2d47f904297133808b3f48fff1a6a1 (diff) | |
download | hercules-65d3824a9e6732760ce0e12201f8b856e097d08e.tar.gz hercules-65d3824a9e6732760ce0e12201f8b856e097d08e.tar.bz2 hercules-65d3824a9e6732760ce0e12201f8b856e097d08e.tar.xz hercules-65d3824a9e6732760ce0e12201f8b856e097d08e.zip |
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13933 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/map.h | 3 | ||||
-rw-r--r-- | src/map/pc.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 11 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/map/map.h b/src/map/map.h index ca40bdd98..8e02becbd 100644 --- a/src/map/map.h +++ b/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 { diff --git a/src/map/pc.c b/src/map/pc.c index 6c2bffeb8..603f2df97 100644 --- a/src/map/pc.c +++ b/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++) { diff --git a/src/map/skill.c b/src/map/skill.c index 857c0c40f..ec8115080 100644 --- a/src/map/skill.c +++ b/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) ) |