-
Posted by Gotai on Fri, 07 Aug 2009 11:57:10
Hi guys,
I was wondering if there's any way to make an include filter that only returns results from players that match all of the specified filters, rather than any of them. As far as I'm aware there's no offline filters, so the only way I see to return online guildmates is by grabbing the IN
_
GUILD results and the ONLINE results, and find out which players are in both lists. Obviously this is not very efficient. Using bit.bor(IN_
GUILD, ONLINE) returns both players that are in guild or players that match the ONLINE flag, as opposed to just online guildies. -
Posted by jnwhiteh on Sun, 09 Aug 2009 20:42:02
bit.band exists for this purpose. It returns anything that matches both.
-
Posted by Gotai on Mon, 10 Aug 2009 01:48:11
From what I understand though these bitfield filters are combined using bit.bor, and compared using bit.band. Take IN
_
GUILD and ONLINE for example, their values are 2 and 32 respectively. Running bit.band on them results in 0, as they have no corresponding bits.Unfortunately - after a discussion in #wowuidev - it seems there currently is no way to do what I want without getting results from either filter seperately and comparing the returned lists manually.
-
Posted by jnwhiteh on Mon, 10 Aug 2009 01:49:36
Okay, thanks for reporting back.
-
Posted by Gotai on Mon, 10 Aug 2009 02:03:05
Of course now I realize I'm a tit and should've just used bit.bor(1,4,16) as the exclude filter with ONLINE as include to leave out any group/friend/interacted
_
with unit. Middle of the night stroke of genious ftw. ^^ -
Posted by jnwhiteh on Mon, 10 Aug 2009 14:43:42
Thanks for reporting back!