summaryrefslogtreecommitdiff
path: root/lib/Multi/API.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2016-04-11 09:21:47 +0200
committerYorhel <git@yorhel.nl>2016-04-11 09:21:51 +0200
commit9f99f7ffda4a0fee6c7cf6ec181f8c3077de2803 (patch)
treeb64a5027ba0ecc52cbefb7475588310e48b86015 /lib/Multi/API.pm
parent9bd67c22575a65a36f0fb56560624156db99fa7c (diff)
API: Added "vns" flag and member to "get character"
Diffstat (limited to 'lib/Multi/API.pm')
-rw-r--r--lib/Multi/API.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm
index 6ddab2b0..b73ec58c 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -781,6 +781,15 @@ my %GET_CHARACTER = (
},
]],
},
+ vns => {
+ fetch => [[ 'id', 'SELECT id, vid, rid, spoil, role FROM chars_vns WHERE id IN(%s)',
+ sub { my($n, $r) = @_;
+ for my $i (@$n) {
+ $i->{vns} = [ map [ $_->{vid}*1, $_->{rid}*1, $_->{spoil}*1, $_->{role} ], grep $i->{id} == $_->{id}, @$r ];
+ }
+ },
+ ]],
+ },
},
filters => {
id => [