Skip to content

Commit

Permalink
fix: show active battle pokemon during inactive hours
Browse files Browse the repository at this point in the history
This is more consistent with the in-game experience.
  • Loading branch information
Mygod committed Nov 18, 2024
1 parent 38b563a commit dcb00ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions server/src/models/Station.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ class Station extends Model {
)

if (!onlyAllStations) {
query
.whereNotNull('battle_pokemon_id')
.andWhere('is_battle_available', true)
.andWhere('battle_end', '>', ts)
query.whereNotNull('battle_pokemon_id').andWhere('battle_end', '>', ts)

if (onlyBattleTier === 'all') {
const battleBosses = new Set()
Expand Down
5 changes: 2 additions & 3 deletions src/features/station/useStationMarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export function useStationMarker({
battle_pokemon_form,
battle_pokemon_gender,
battle_pokemon_id,
is_battle_available,
battle_pokemon_bread_mode,
start_time,
end_time,
Expand Down Expand Up @@ -54,7 +53,7 @@ export function useStationMarker({
return divIcon({
popupAnchor: [
0 + stationMod.popupX + stationMod.offsetX,
(-baseSize - (is_battle_available && isActive ? battleSize : 0)) * 0.67 +
(-baseSize - (isActive ? battleSize : 0)) * 0.67 +
stationMod.popupY +
stationMod.offsetY +
(-5 + battleMod.offsetY + battleMod.popupY),
Expand All @@ -75,7 +74,7 @@ export function useStationMarker({
"
/>
${
is_battle_available && isActive
isActive
? /* html */ `
<img
src="${battleIcon}"
Expand Down

0 comments on commit dcb00ab

Please sign in to comment.