Skip to content

Commit

Permalink
Reference .pokemon_id rather than .id for mons
Browse files Browse the repository at this point in the history
  • Loading branch information
Grennith committed Jan 23, 2024
1 parent cce2be2 commit 14df373
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mapadroid/db/DbPogoProtoSubmitRaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def mons(self, session: AsyncSession, timestamp: float,
spawnid: int = int(str(wild_mon.spawn_point_id), 16)
lat: float = wild_mon.latitude
lon: float = wild_mon.longitude
mon_id: int = wild_mon.pokemon.id
mon_id: int = wild_mon.pokemon.pokemon_id
encounter_id: int = wild_mon.encounter_id

if encounter_id < 0:
Expand Down Expand Up @@ -260,7 +260,7 @@ async def mon_iv(self, session: AsyncSession, timestamp: float,
return None
encounter_id: int = wild_pokemon.encounter_id
pokemon_data: pogoprotos.PokemonProto = wild_pokemon.pokemon
mon_id: int = pokemon_data.id
mon_id: int = pokemon_data.pokemon_id
pokemon_display: pogoprotos.PokemonDisplayProto = pokemon_data.pokemon_display
weather_boosted: int = pokemon_display.weather_boosted_condition
if encounter_id < 0:
Expand Down Expand Up @@ -361,7 +361,7 @@ async def mon_lure_iv(self, session: AsyncSession, timestamp: float,
logger.debug3("Updating IV sent for encounter at {}", timestamp)

pokemon_data: pogoprotos.PokemonProto = encounter_proto.pokemon
mon_id: int = pokemon_data.id
mon_id: int = pokemon_data.pokemon_id
display: pogoprotos.PokemonDisplayProto = pokemon_data.pokemon_display
weather_boosted: int = display.weather_boosted_condition
encounter_id: int = display.display_id
Expand Down Expand Up @@ -873,7 +873,7 @@ async def raids(self, session: AsyncSession, map_proto: pogoprotos.GetMapObjects
raids_seen += 1
raid_info: pogoprotos.RaidInfoProto = gym.raid_info

pokemon_id: Optional[int] = raid_info.raid_pokemon.pokemon_id
pokemon_id: Optional[int] = raid_info.raid_pokemon.pokemon_id.real
cp: int = raid_info.raid_pokemon.cp
move_1: int = raid_info.raid_pokemon.move1
move_2: int = raid_info.raid_pokemon.move2
Expand Down

0 comments on commit 14df373

Please sign in to comment.