1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-08 03:37:45 +00:00

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.
This commit is contained in:
Sophie Hamilton 2020-03-02 03:48:28 +00:00
parent 3d5ad28df8
commit 579972278b

View file

@ -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