POGOserver/src/models/Player/packets/UseXpBoost.js
Nagy Péter 1b2ba7c6c1 - Lucky Egg working now
- Forgot to include the response.js now fixed
2016-12-03 04:14:04 +01:00

25 lines
586 B
JavaScript

import POGOProtos from "pokemongo-protobuf";
import print from "../../../print";
/**
* @param {Object} msg
* @return {Buffer}
*/
export default function UseXpBoost(msg) {
let buffer = null;
buffer = { result: "SUCCESS",
applied_items:{item:[
{
item_id: msg.item_id,
item_type: "ITEM_TYPE_XP_BOOST",
expire_ms: +new Date()+20000,//1800000 ,
applied_ms:+new Date()
}
]}};
this.removeItems({"301":1});
this.info.LuckyEggExp = +new Date()+20000;
return (
POGOProtos.serialize(buffer, "POGOProtos.Networking.Responses.UseItemXpBoostResponse")
);
}