summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/functions/filters.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/npc/functions/filters.txt b/npc/functions/filters.txt
index ec64f3717..1b13aa59e 100644
--- a/npc/functions/filters.txt
+++ b/npc/functions/filters.txt
@@ -70,7 +70,16 @@ function script filter_hostile {
// Players outside PVP
if (.@type == UNITTYPE_PC) {
- if (!ispvpmap())
+ getmapxy(.@m$, .@x, .@y, .@type, .@chkid);
+ if (!ispvpmap(.@m$))
+ return false;
+ // Honor party flag
+ if (!getmapflag(.@mapa$, mf_pvp_noparty) &&
+ getcharid(1) == getcharid(1, strcharinfo(0, "", .@chkid)))
+ return false;
+ // Honor guild flag
+ if (!getmapflag(.@mapa$, mf_pvp_noguild) &&
+ getcharid(2) == getcharid(2, strcharinfo(0, "", .@chkid)))
return false;
}