summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-12 15:19:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-12 15:19:49 +0000
commitd3446b8051e0f084721198b85c067597f26c5dfd (patch)
treecf3b13227a8de1a1c7c8b131c6b3bd96e94bdc7f /src/map/skill.c
parent55ba4be17e2abefa0fdaa25c387bf30bdaf49332 (diff)
downloadhercules-d3446b8051e0f084721198b85c067597f26c5dfd.tar.gz
hercules-d3446b8051e0f084721198b85c067597f26c5dfd.tar.bz2
hercules-d3446b8051e0f084721198b85c067597f26c5dfd.tar.xz
hercules-d3446b8051e0f084721198b85c067597f26c5dfd.zip
- Changed the meaning of inf2=0x1000. Now it is used to "disable usage on enemies", which only works for non-aggressive (inf!=1) skills.
- If a skill is party/guild only (inf2 0x400/0x800) it will also be castable on enemies if the skill's inf is 1 (offensive target) - Corrected the mob behaviour when it locks into an enemy it can't chase. Previously it would get stuck on a lock->unlock->lock loop, with each unlock resetting the "random walk" timer, causing the mob to just idle in place. Now they will attempt idle skills and no longer reset the "random walk" timer, so they behave as if they were in Idle state properly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10234 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index d7334a079..b2dfd3abd 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5676,14 +5676,17 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
if(inf&INF_ATTACK_SKILL ||
(inf&INF_SELF_SKILL && inf2&INF2_NO_TARGET_SELF)) //Combo skills
inf = BCT_ENEMY; //Offensive skill.
- else
- inf = 0;
+ else if(inf2&INF2_NO_ENEMY)
+ inf = BCT_NOENEMY;
if(inf2 & (INF2_PARTY_ONLY|INF2_GUILD_ONLY) && src != target)
+ {
inf |=
(inf2&INF2_PARTY_ONLY?BCT_PARTY:0)|
- (inf2&INF2_GUILD_ONLY?BCT_GUILD:0)|
- (inf2&INF2_ALLOW_ENEMY?BCT_ENEMY:0);
+ (inf2&INF2_GUILD_ONLY?BCT_GUILD:0);
+ //Remove neutral targets (but allow enemy if skill is designed to be so)
+ inf &= ~BCT_NEUTRAL;
+ }
if (inf && battle_check_target(src, target, inf) <= 0)
break;