mirror of
https://github.com/maierfelix/POGOserver.git
synced 2026-07-13 06:41:12 -05:00
Update, bug fix
- Fixed AI bug in auto table generation - Updated to 0.4.9 - Fixed avatar change bug - Working on tutorial completion - Removed unused print
This commit is contained in:
parent
16880d56df
commit
a500b0c6e1
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "POGOServer",
|
||||
"version": "0.4.8",
|
||||
"version": "0.4.9",
|
||||
"description": "",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
id int(11) NOT NULL,
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
owner_id int(11) NOT NULL,
|
||||
pokemon_id varchar(32) NOT NULL,
|
||||
cp int(32) NOT NULL,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
id int(11) NOT NULL,
|
||||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
username longtext NOT NULL,
|
||||
email longtext NOT NULL,
|
||||
exp int(255) NOT NULL,
|
||||
|
|
|
|||
|
|
@ -1,18 +1,25 @@
|
|||
import proto from "../proto";
|
||||
import POGOProtos from "pokemongo-protobuf";
|
||||
|
||||
import { GetPlayer } from "./";
|
||||
|
||||
/**
|
||||
* @param {Player} player
|
||||
* @param {Object} req
|
||||
* @return {Object}
|
||||
*/
|
||||
export default function MarkTutorialComplete(player) {
|
||||
export default function MarkTutorialComplete(player, req) {
|
||||
|
||||
return (
|
||||
new proto.Networking.Responses.MarkTutorialCompleteResponse({
|
||||
success: true,
|
||||
player_data: GetPlayer(player).player_data
|
||||
}).encode()
|
||||
);
|
||||
if (req.tutorials_completed[0] === "LEGAL_SCREEN") {
|
||||
player.tutorial_state.push("LEGAL_SCREEN");
|
||||
player.send_marketing_emails = !!req.send_marketing_emails;
|
||||
}
|
||||
|
||||
let buffer = ({
|
||||
success: true,
|
||||
player_data: GetPlayer(player).player_data
|
||||
});
|
||||
|
||||
return POGOProtos.serialize(buffer, "POGOProtos.Networking.Responses.GetHatchedEggsResponse");
|
||||
|
||||
}
|
||||
|
|
@ -11,9 +11,13 @@ export default function SetAvatar(player) {
|
|||
|
||||
let buffer = ({
|
||||
status: proto.Networking.Responses.SetAvatarResponse.Status.SUCCESS,
|
||||
player_data: GetPlayer(player).player_data
|
||||
player_data: GetPlayer(player)
|
||||
});
|
||||
|
||||
if (player.tutorial_state.indexOf("AVATAR_SELECTION") === -1) {
|
||||
player.tutorial_state.push("AVATAR_SELECTION");
|
||||
}
|
||||
|
||||
return (POGOProtos.serialize(buffer, "POGOProtos.Networking.Responses.SetAvatarResponse"));
|
||||
|
||||
}
|
||||
|
|
@ -488,7 +488,6 @@ export function registerPlayer(player) {
|
|||
this.createUser(player).then(() => {
|
||||
this.print(`${player.email} registered!`, 36);
|
||||
this.loginPlayer(player).then((res) => {
|
||||
this.print("Registered and logged in!", 31);
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -125,12 +125,37 @@ export function processResponse(player, req) {
|
|||
buffer = SfidaActionLog();
|
||||
break;
|
||||
case "MARK_TUTORIAL_COMPLETE":
|
||||
buffer = MarkTutorialComplete(player);
|
||||
buffer = MarkTutorialComplete(player, msg);
|
||||
this.savePlayer(player).then(() => {
|
||||
resolve(buffer);
|
||||
});
|
||||
return void 0;
|
||||
break;
|
||||
case "ENCOUNTER_TUTORIAL_COMPLETE":
|
||||
let starters = ["BULBASAUR", "CHARMANDER", "SQUIRTLE"];
|
||||
// Make sure the catched pokemon is valid
|
||||
if (starters.indexOf(msg.pokemon_id) === -1) {
|
||||
if (player.tutorial_state.indexOf("POKEMON_CAPTURE") === -1) {
|
||||
player.tutorial_state.push("POKEMON_CAPTURE");
|
||||
}
|
||||
let pkmn = {
|
||||
pokemon_id: msg.pokemon_id,
|
||||
cp: 15,
|
||||
stamina: 10,
|
||||
stamina_max: 10,
|
||||
move_1: "TACKLE",
|
||||
move_2: "TACKLE",
|
||||
height_m: 0.20962005257606506,
|
||||
weight_kg: 0.3212273120880127,
|
||||
individual_attack: 7,
|
||||
individual_defense: 7,
|
||||
individual_stamina: 3,
|
||||
cp_multiplier: 0.16639786958694458
|
||||
};
|
||||
player.party.push(pkmn);
|
||||
buffer = POGOProtos.serialize(buffer, "POGOProtos.Networking.Responses.EncounterTutorialCompleteResponse");
|
||||
}
|
||||
break;
|
||||
case "CLAIM_CODENAME":
|
||||
buffer = ClaimCodeName(msg, player);
|
||||
this.savePlayer(player).then(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user