mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 06:04:59 +00:00
Fixed code assuming map metadata exists, fixed misplaced species data methods, rewrote class PokeBattle_Pokemon
This commit is contained in:
@@ -178,8 +178,9 @@ EncounterModifier.register(proc { |encounter|
|
||||
# are in the same region
|
||||
if roamerMap!=$game_map.map_id
|
||||
currentRegion = pbGetCurrentRegion
|
||||
map_position = GameData::MapMetadata.get(roamerMap).town_map_position
|
||||
next if !map_position || map_position[0] != currentRegion
|
||||
map_metadata = GameData::MapMetadata.try_get(roamerMap)
|
||||
next if !map_metadata || !map_metadata.town_map_position ||
|
||||
map_metadata.town_map_position[0] != currentRegion
|
||||
currentMapName = pbGetMessage(MessageTypes::MapNames,$game_map.map_id)
|
||||
next if pbGetMessage(MessageTypes::MapNames,roamerMap)!=currentMapName
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user