diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-06-23 01:09:30 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-06-23 01:09:30 -0300 |
commit | c287943f22b294bb074411ae3e3d04ce02726841 (patch) | |
tree | 8c93db35addd1761a24e92a7a7be9131c3f27379 /npc/functions/filters.txt | |
parent | 9701df54795ff74f23391a259edb29196d0fbd4f (diff) | |
download | serverdata-c287943f22b294bb074411ae3e3d04ce02726841.tar.gz serverdata-c287943f22b294bb074411ae3e3d04ce02726841.tar.bz2 serverdata-c287943f22b294bb074411ae3e3d04ce02726841.tar.xz serverdata-c287943f22b294bb074411ae3e3d04ce02726841.zip |
Fix a few tiny bugs
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)); } |