diff --git a/src/commands.js b/src/commands.js index f9b8cae..cde59bb 100644 --- a/src/commands.js +++ b/src/commands.js @@ -56,8 +56,8 @@ export function getUserQueryData(obj) { 0, //obj.contact.sendPushNotifications, // inventory '{}', //obj.candyBag, - '{}', //obj.bag, - '{}', //obj.avatar, + obj.bag.querify(), //obj.bag, + obj.avatar.querify(), //obj.avatar, '{"0":1,"1":1,"3":1,"4":1,"7":1}', //obj.tutorial, // WHERE obj.email diff --git a/src/models/Player/Avatar/index.js b/src/models/Player/Avatar/index.js index 1b4ff2d..9918d1f 100644 --- a/src/models/Player/Avatar/index.js +++ b/src/models/Player/Avatar/index.js @@ -153,6 +153,23 @@ export default class Avatar { }); } + /** + * @return {String} + */ + querify() { + return (JSON.stringify({ + skin: this.skin, + hair: this.hair, + shirt: this.shirt, + pants: this.pants, + hat: this.hat, + shoes: this.shoes, + eyes: this.eyes, + gender: this.gender, + backpack: this.backpack + })); + } + /** * @param {String} str */ diff --git a/src/models/Player/Tutorial/index.js b/src/models/Player/Tutorial/index.js index f0e1798..8358ef9 100644 --- a/src/models/Player/Tutorial/index.js +++ b/src/models/Player/Tutorial/index.js @@ -50,8 +50,10 @@ export default class Tutorial { * @return {String} */ querify() { - let buffer = { - "states": this.serialize() + let buffer = {}; + for (let key in this.states) { + let itemId = this.getItemName(key); + buffer[itemId] = this[key]; }; return (JSON.stringify(buffer)); }