Fix retrieving/saving Pokémon

This commit is contained in:
Jonas Bannert 2016-09-13 18:24:12 +02:00
parent 5caf7c0752
commit 92b07bc634

View File

@ -96,6 +96,9 @@ export default class Pokemon extends MapObject {
else if (key === "id") {
this.uid = parseInt(obj[key]);
}
else if (key == "pokemon_id") {
this.dexNumber = parseInt(obj[key]);
}
else if (key === "move_1") {
this.move1 = obj[key];
}
@ -215,7 +218,7 @@ export default class Pokemon extends MapObject {
let query = `
INSERT INTO ${CFG.MYSQL_OWNED_PKMN_TABLE} SET
owner_id=?,
dex_number=?,
pokemon_id=?,
cp=?,
stamina=?,
stamina_max=?,
@ -295,4 +298,4 @@ export default class Pokemon extends MapObject {
}
inherit(Pokemon, _calc);
inherit(Pokemon, _actions);
inherit(Pokemon, _actions);