summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2017-03-03 11:37:57 +0100
committerYorhel <git@yorhel.nl>2017-03-03 11:37:57 +0100
commit8629c32832cc0f8f91fbcf6f12ece9c4210f7e1c (patch)
tree049f62b0f30cb00018a7735e1825c3b3c1f0494c /lib
parentcb1af38ef7cfc49932ed5e3176505f4e2f3e639c (diff)
API: Add traits filter to get character
Diffstat (limited to 'lib')
-rw-r--r--lib/Multi/API.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm
index 4d856aad..807e72f8 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -827,6 +827,10 @@ my %GET_CHARACTER = (
[ 'int' => 'c.id IN(SELECT cv.id FROM chars_vns cv WHERE cv.vid = :value:)', {'=',1}, range => [1,1e6] ],
[ inta => 'c.id IN(SELECT cv.id FROM chars_vns cv WHERE cv.vid IN(:value:))', {'=',1}, range => [1,1e6], join => ',' ],
],
+ traits => [
+ [ int => 'c.id :op:(SELECT tc.cid FROM traits_chars tc WHERE tc.tid = :value:)', {'=' => 'IN', '!=' => 'NOT IN'}, range => [1,1e6] ],
+ [ inta => 'c.id :op:(SELECT tc.cid FROM traits_chars tc WHERE tc.tid IN(:value:))', {'=' => 'IN', '!=' => 'NOT IN'}, join => ',', range => [1,1e6] ],
+ ],
},
);