summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/skill.c17
-rw-r--r--src/map/skill.h2
3 files changed, 9 insertions, 12 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 63d097b14..fc7e5c7a8 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6358,7 +6358,7 @@ int pc_checkitem(struct map_session_data *sd)
continue;
if( battle_config.item_check && !itemdb_available(id) ){
if(battle_config.error_log)
- ShowWarning("illeagal item id %d in %d[%s] cart.\n",id,sd->bl.id,sd->status.name);
+ ShowWarning("illegal item id %d in %d[%s] cart.\n",id,sd->bl.id,sd->status.name);
pc_cart_delitem(sd,i,sd->status.cart[i].amount,1);
continue;
}
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;
}
diff --git a/src/map/skill.h b/src/map/skill.h
index a5b1e25cf..650fb6ae7 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -40,6 +40,8 @@
#define INF2_NO_TARGET_SELF 512
#define INF2_PARTY_ONLY 1024
#define INF2_GUILD_ONLY 2048
+//For Party/Guild only skills that can ALSO be used on enemies.
+#define INF2_ALLOW_ENEMY 4096
//Walk intervals at which chase-skills are attempted to be triggered.
#define WALK_SKILL_INTERVAL 5