summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-28 16:42:32 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-28 16:42:32 +0000
commit2fbedc46150f0b296d165ff58defd3a5e6a7deb9 (patch)
treedfb2d83b6246cdea6f645af0a05e5ba365345105 /src/map/skill.c
parente07b2da8d90f955dbe01737e9bfdb73ddaa3bd83 (diff)
downloadhercules-2fbedc46150f0b296d165ff58defd3a5e6a7deb9.tar.gz
hercules-2fbedc46150f0b296d165ff58defd3a5e6a7deb9.tar.bz2
hercules-2fbedc46150f0b296d165ff58defd3a5e6a7deb9.tar.xz
hercules-2fbedc46150f0b296d165ff58defd3a5e6a7deb9.zip
- Added inf2 4096 (INF2_ALLOW_ENEMY) which is to be used in conjunction with INF2_PARTY_ONLY/INF2_GUILD_ONLY when said skill should ALSO be allowed to be used on enemies.
- Updated Soul Change to use inf2 4096 (INF2_ALLOW_ENEMY). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7376 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 7f460e507..b43112109 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5545,17 +5545,12 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data)
inf2 = skill_get_inf2(ud->skillid);
if(inf2 & (INF2_PARTY_ONLY|INF2_GUILD_ONLY) && src != target) {
- int fail_flag = 1;
- if(inf2 & INF2_PARTY_ONLY && battle_check_target(src, target, BCT_PARTY) > 0)
- fail_flag = 0;
- else if(inf2 & INF2_GUILD_ONLY && battle_check_target(src, target, BCT_GUILD) > 0)
- fail_flag = 0;
-
- if (ud->skillid == PF_SOULCHANGE && map_flag_vs(target->m))
- //Soul Change overrides this restriction during pvp/gvg [Skotlex]
- fail_flag = 0;
-
- if(fail_flag)
+ inf2 =
+ (inf2&INF2_PARTY_ONLY?BCT_PARTY:0)|
+ (inf2&INF2_GUILD_ONLY?BCT_GUILD:0)|
+ (inf2&INF2_ALLOW_ENEMY?BCT_ENEMY:0);
+
+ if(battle_check_target(src, target, inf2) <= 0)
break;
}