From adc27df81198a748c44968a094c95bea62c6ffe1 Mon Sep 17 00:00:00 2001 From: Felix Date: Wed, 7 Sep 2016 20:14:10 +0200 Subject: [PATCH] Fix setup process, 0.5.6 - Fixed register step - Added default tutorial value to user table - Fixed table generation --- package.json | 2 +- src/db/tables/{spawn.table => spawn_points.table} | 2 +- src/db/tables/users.table | 2 +- src/models/World/Cell/index.js | 8 -------- src/models/World/SpawnPoint/index.js | 1 - src/models/World/players.js | 1 - 6 files changed, 3 insertions(+), 13 deletions(-) rename src/db/tables/{spawn.table => spawn_points.table} (82%) diff --git a/package.json b/package.json index b3f7be7..3e9219e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "POGOServer", - "version": "0.5.5", + "version": "0.5.6", "description": "", "repository": { "type": "git", diff --git a/src/db/tables/spawn.table b/src/db/tables/spawn_points.table similarity index 82% rename from src/db/tables/spawn.table rename to src/db/tables/spawn_points.table index 2ea434e..47b4225 100644 --- a/src/db/tables/spawn.table +++ b/src/db/tables/spawn_points.table @@ -3,7 +3,7 @@ cell_id varchar(64) NOT NULL, latitude double NOT NULL DEFAULT '0', longitude double NOT NULL DEFAULT '0', encounters varchar(64) NOT NULL DEFAULT '{}', -interval int(11) NOT NULL DEFAULT '5', +update_interval int(11) NOT NULL DEFAULT '5', min_spawn_expire int(11) NOT NULL DEFAULT '2', max_spawn_expire int(11) NOT NULL DEFAULT '15', PRIMARY KEY (id) \ No newline at end of file diff --git a/src/db/tables/users.table b/src/db/tables/users.table index 0b9d476..168eb5b 100644 --- a/src/db/tables/users.table +++ b/src/db/tables/users.table @@ -14,5 +14,5 @@ send_push_notifications tinyint(1) NOT NULL, candies varchar(64) NOT NULL DEFAULT '{}', items varchar(64) NOT NULL DEFAULT '{}', avatar varchar(9999) NOT NULL DEFAULT '{}', -tutorial varchar(64) NOT NULL DEFAULT '{}', +tutorial varchar(64) NOT NULL DEFAULT '{"0":1,"1":1,"3":1,"4":1,"7":1}', PRIMARY KEY (id) \ No newline at end of file diff --git a/src/models/World/Cell/index.js b/src/models/World/Cell/index.js index 60e7eaf..e7cb43c 100644 --- a/src/models/World/Cell/index.js +++ b/src/models/World/Cell/index.js @@ -38,14 +38,6 @@ export default class Cell extends MapObject { } - get uPkmnId() { - return (this._uPkmnId); - } - set uPkmnId(value) { - if (this.uPkmnId < Number.MAX_SAFE_INTEGER) this._uPkmnId += value; - else this._uPkmnId = 0; - } - /** * @param {Number} lat * @param {Number} lng diff --git a/src/models/World/SpawnPoint/index.js b/src/models/World/SpawnPoint/index.js index cc76684..83b5c0f 100644 --- a/src/models/World/SpawnPoint/index.js +++ b/src/models/World/SpawnPoint/index.js @@ -73,7 +73,6 @@ export default class SpawnPoint extends MapObject { pokeball: "ITEM_POKE_BALL", favorite: 0, isWild: true, - uid: this.uPkmnId++, cellId: this.cellId, minExpire: this.minExpire, maxExpire: this.maxExpire diff --git a/src/models/World/players.js b/src/models/World/players.js index 3a33c8f..3f529a4 100644 --- a/src/models/World/players.js +++ b/src/models/World/players.js @@ -92,7 +92,6 @@ export function registerPlayer(player) { return new Promise((resolve) => { this.db.query(`INSERT INTO ${CFG.MYSQL_USERS_TABLE} SET email=? `, [player.email], (e, res) => { if (e) return this.print(e, 31); - player.id = id; resolve(); }); });