diff options
Diffstat (limited to 'npc/functions/filters.txt')
-rw-r--r-- | npc/functions/filters.txt | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/npc/functions/filters.txt b/npc/functions/filters.txt index f47c16beb..945ab8bce 100644 --- a/npc/functions/filters.txt +++ b/npc/functions/filters.txt @@ -64,37 +64,35 @@ function script filter_sameguildorpartynotyou { // filter_hostile( id ) function script filter_hostile { - debugmes "filter_hostile %d", getarg(0); - .@type=getunitdata(getarg(0), UDT_TYPE); + //.@type=getunitdata(getarg(0), UDT_TYPE); + .@type=getunittype(getarg(0)); .@chkid=getarg(0); - debugmes "filter_hostile: Checking %d (BL %d)", getarg(0), .@type; - // Monsters - if (.@type == BL_MOB) + if (.@type == UNITTYPE_MOB) return true; // NPCs - if (.@type == BL_NPC) + if (.@type == UNITTYPE_NPC) return false; // Homunculus - if (.@type == BL_HOM) + if (.@type == UNITTYPE_HOM) .@chkid=charid2rid(getunitdata(getarg(0), UDT_MASTERCID)); // Pets - if (.@type == BL_PET) + if (.@type == UNITTYPE_PET) .@chkid=getunitdata(getarg(0), UDT_MASTERAID); // Mercenaries - if (.@type == BL_MER) + if (.@type == UNITTYPE_MER) .@chkid=charid2rid(getunitdata(getarg(0), UDT_MASTERCID)); // Elementals - if (.@type == BL_ELEM) + if (.@type == UNITTYPE_ELEM) .@chkid=charid2rid(getunitdata(getarg(0), UDT_MASTERCID)); - debugmes "filter_hostile: Filtering %d (original %d) (BL %d)", .@chkid, getarg(0), .@type; + //debugmes "filter_hostile: Filtering %d (original %d) (BL %d)", .@chkid, getarg(0), .@type; // Players (and slaves) return !(filter_sameguildorparty(.@chkid)); } |