From 0c20b64af39dc72f4ae0b34eab9bfbe4d2c20931 Mon Sep 17 00:00:00 2001 From: collett Date: Sat, 6 Feb 2021 03:25:55 +0900 Subject: [PATCH] bug fix --- src/world/Manager/HousingMgr.cpp | 2 ++ src/world/Territory/House.cpp | 5 +++++ src/world/Territory/House.h | 2 ++ 3 files changed, 9 insertions(+) diff --git a/src/world/Manager/HousingMgr.cpp b/src/world/Manager/HousingMgr.cpp index de302205..10f3616a 100644 --- a/src/world/Manager/HousingMgr.cpp +++ b/src/world/Manager/HousingMgr.cpp @@ -907,6 +907,8 @@ void Sapphire::World::Manager::HousingMgr::updateHouseModels( Sapphire::HousePtr { assert( house ); + house->clearModelCache(); + auto& containers = getEstateInventory( house->getLandIdent() ); auto extContainer = containers.find( static_cast< uint16_t >( InventoryType::HousingExteriorAppearance ) ); diff --git a/src/world/Territory/House.cpp b/src/world/Territory/House.cpp index c5f44bc6..518021dc 100644 --- a/src/world/Territory/House.cpp +++ b/src/world/Territory/House.cpp @@ -64,6 +64,11 @@ Sapphire::House::ExteriorModelsArray const& Sapphire::House::getHouseModels() co return m_exteriorModelCache; } +void Sapphire::House::clearModelCache() +{ + m_exteriorModelCache.fill( std::make_pair( 0, 0 ) ); +} + const std::string& Sapphire::House::getHouseName() const { return m_estateName; diff --git a/src/world/Territory/House.h b/src/world/Territory/House.h index 9a3a3da0..6d195cd0 100644 --- a/src/world/Territory/House.h +++ b/src/world/Territory/House.h @@ -41,6 +41,8 @@ namespace Sapphire ExteriorModelsArray const& getHouseModels() const; + void clearModelCache(); + void updateHouseDb(); void setHasAetheryte( bool hasAetheryte );