From 3a508c7a9afefef49736a986f4dba720a605e04c Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 29 Jun 2020 14:37:14 -0300 Subject: Filter_Hostile will now regard PVP restrictions --- npc/functions/filters.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3-60-g2f50