Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Schmitt committed Aug 22, 2016
1 parent 021fcfa commit 4be4325
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions app/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,5 @@ body, html, .content {

a.destBtn {
color: #eee; }

.hide { display:none; }
12 changes: 6 additions & 6 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

$(".inventory .refresh").click(function() {
console.log("Refresh");
wssend(global.active + "List");
wssend(global.active[0].toUpperCase() + global.active.substring(1) + "List");
});

$(".inventory .close").click(function() {
Expand Down Expand Up @@ -103,8 +103,8 @@
ga("send", "event", "transfer", name);
wssend({
Command: "TransferPokemon",
PokemonId: transfer.attr("id"),
Data: transfer.attr("id")
PokemonId: id,
Data: id
});
global.map.pokemonList.splice(idx, 1);
parent.parent().fadeOut();
Expand All @@ -123,8 +123,8 @@
ga("send", "event", "evolve", name);
wssend({
Command: "EvolvePokemon",
PokemonId: evolve.attr("id"),
Data: evolve.attr("id")
PokemonId: id,
Data: id
});
global.map.pokemonList.splice(idx, 1);
parent.parent().fadeOut();
Expand All @@ -143,7 +143,7 @@
parent.find(".transferAction").toggleClass("hide");
wssend({
Command: "FavoritePokemon",
PokemonId: evolve.attr("id"),
PokemonId: id,
Favorite: selected.favorite
});
});
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/inventory.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
749:33, 752:33.5, 755:34, 758:34.5, 761:35, 764:35.5, 767:36, 770:36.5, 773:37,
776: 37.5, 778:38, 781:38.5, 784:39, 790:40};
service.getPokemonLevel = function(pokemon) {
var p = (pokemon.combat_power_multiplier + pokemon.additional_cp_multiplier)*1000;
var p = (pokemon.CpMultiplier + pokemon.AdditionalCpMultiplier)*1000;
return lvlMap[p|0];
}

Expand Down
1 change: 0 additions & 1 deletion app/scripts/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ Map.prototype.displayPokemonList = function(all, sortBy, eggs) {
<span class="imgspan ${evolveClass}"><img src="./assets/pokemon/${elt.pokemonId}.png" /></span>
<span class="name">${elt.name} lvl ${elt.lvl}</span>
<span class="info">CP: <strong>${elt.cp}</strong> IV: <strong>${elt.iv}%</strong></span>
<span class="info hide-on-small-only">ATK: <strong>${elt.stats.atk}</strong> DEF: <strong>${elt.stats.def}</strong> STA: <strong>${elt.stats.sta}</strong></span>
<span class="info">Candy: ${elt.candy}<span ${candyStyle}>/${elt.candyToEvolve}</span></span>
</div>
`);
Expand Down
7 changes: 5 additions & 2 deletions app/scripts/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ function listenToWebSocket() {
realname: inventory.getPokemonName(p.Item1.PokemonId, "en"),
candy: p.Item3,
candyToEvolve: pkmInfo ? pkmInfo.CandyToEvolve : 0,
favorite: p.Item1.Favorite != 0
favorite: p.Item1.Favorite != 0,
lvl: inventory.getPokemonLevel(p.Item1),
}
});
global.map.displayPokemonList(pkm);
Expand Down Expand Up @@ -168,7 +169,9 @@ function listenToWebSocket() {
// nothing
} else if (command.indexOf("EggIncubatorStatusEvent") >= 0) {
// nothing
} else if (command.indexOf("iconAnchor") >= 0) {
} else if (command.indexOf("HumanWalkingEvent") >= 0) {
// nothing
} else if (command.indexOf("UnaccurateLocation") >= 0) {
// nothing
} else if (command.indexOf("ErrorEvent") >= 0) {
console.log(msg.Message);
Expand Down

0 comments on commit 4be4325

Please sign in to comment.