From 579972278b0f31de4e52dc3652d00a4c897c4863 Mon Sep 17 00:00:00 2001 From: Sophie Hamilton Date: Mon, 2 Mar 2020 03:48:28 +0000 Subject: [PATCH] Make Player::discover() honour passed map_id The Sapphire::Entity::Player::discover() method never actually honoured the passed map_id, instead always using the ID of the map the player was currently in. --- src/world/Actor/Player.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index e949afab..cd8d6c79 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -603,8 +603,7 @@ void Sapphire::Entity::Player::discover( int16_t map_id, int16_t sub_id ) int32_t offset = 4; - auto info = exdData.get< Sapphire::Data::Map >( - exdData.get< Sapphire::Data::TerritoryType >( getCurrentTerritory()->getTerritoryTypeId() )->map ); + auto info = exdData.get< Sapphire::Data::Map >( map_id ); if( info->discoveryArrayByte ) offset = 5 + 2 * info->discoveryIndex; else