summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-29 14:37:14 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-29 14:37:14 -0300
commit3a508c7a9afefef49736a986f4dba720a605e04c (patch)
tree23d89a97c01d255ed33966cb485c093cb892cba7 /npc
parente02fddbbaac720d82ed01d90ad260ceb317680f5 (diff)
downloadserverdata-3a508c7a9afefef49736a986f4dba720a605e04c.tar.gz
serverdata-3a508c7a9afefef49736a986f4dba720a605e04c.tar.bz2
serverdata-3a508c7a9afefef49736a986f4dba720a605e04c.tar.xz
serverdata-3a508c7a9afefef49736a986f4dba720a605e04c.zip
Filter_Hostile will now regard PVP restrictions
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;
}