diff --git a/src/common/Common.h b/src/common/Common.h index caed668e..5fb1a59c 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -249,8 +249,8 @@ namespace Sapphire::Common // housing exterior containers - HousingExteriorPlacedItems = 25001, HousingExteriorAppearance = 25000, + HousingExteriorPlacedItems = 25001, HousingExteriorStoreroom = 27000, diff --git a/src/world/Actor/PlayerSql.cpp b/src/world/Actor/PlayerSql.cpp index 136ddd40..1aeb33ee 100644 --- a/src/world/Actor/PlayerSql.cpp +++ b/src/world/Actor/PlayerSql.cpp @@ -580,10 +580,7 @@ Sapphire::ItemPtr Sapphire::Entity::Player::createItem( uint32_t catalogId, uint uint8_t flags = 0; - ItemPtr pItem = make_Item( Items::Util::getNextUId(), - catalogId, - itemInfo->modelMain, - itemInfo->modelSub ); + ItemPtr pItem = make_Item( Items::Util::getNextUId(), catalogId ); pItem->setStackSize( quantity ); diff --git a/src/world/Inventory/HousingItem.cpp b/src/world/Inventory/HousingItem.cpp index 2b32736e..139e5e94 100644 --- a/src/world/Inventory/HousingItem.cpp +++ b/src/world/Inventory/HousingItem.cpp @@ -1,7 +1,7 @@ #include "HousingItem.h" Sapphire::Inventory::HousingItem::HousingItem( uint64_t uId, uint32_t catalogId ) : - Sapphire::Item( uId, catalogId, 0, 0, false ) + Sapphire::Item( uId, catalogId, false ) { } float Sapphire::Inventory::HousingItem::getRot() const diff --git a/src/world/Inventory/Item.cpp b/src/world/Inventory/Item.cpp index 5421f355..c3199ef5 100644 --- a/src/world/Inventory/Item.cpp +++ b/src/world/Inventory/Item.cpp @@ -7,11 +7,9 @@ extern Sapphire::Framework g_fw; -Sapphire::Item::Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, bool isHq ) : +Sapphire::Item::Item( uint64_t uId, uint32_t catalogId, bool isHq ) : m_id( catalogId ), m_uId( uId ), - m_model1( model1 ), - m_model2( model2 ), m_isHq( isHq ), m_stain( 0 ), m_durability( 30000 ) @@ -22,6 +20,8 @@ Sapphire::Item::Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_ m_delayMs = itemInfo->delayms; m_physicalDmg = itemInfo->damagePhys; m_magicalDmg = itemInfo->damageMag; + m_model1 = itemInfo->modelMain; + m_model2 = itemInfo->modelSub; m_weaponDmg = ( m_physicalDmg != 0 ) ? m_physicalDmg : m_magicalDmg; m_autoAttackDmg = static_cast< float >( m_weaponDmg * m_delayMs ) / 3000; m_category = static_cast< Common::ItemUICategory >( itemInfo->itemUICategory ); diff --git a/src/world/Inventory/Item.h b/src/world/Inventory/Item.h index e5babd3d..6d30012c 100644 --- a/src/world/Inventory/Item.h +++ b/src/world/Inventory/Item.h @@ -10,7 +10,7 @@ namespace Sapphire { public: - Item( uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, bool isHq = false ); + Item( uint64_t uId, uint32_t catalogId, bool isHq = false ); ~Item() = default; diff --git a/src/world/Inventory/ItemUtil.cpp b/src/world/Inventory/ItemUtil.cpp index bb036828..6d896b9c 100644 --- a/src/world/Inventory/ItemUtil.cpp +++ b/src/world/Inventory/ItemUtil.cpp @@ -132,11 +132,7 @@ Sapphire::ItemPtr Sapphire::Items::Util::loadItem( uint64_t uId ) auto itemInfo = pExdData->get< Sapphire::Data::Item >( itemRes->getUInt( 1 ) ); bool isHq = itemRes->getUInt( 3 ) == 1; - ItemPtr pItem = make_Item( uId, - itemRes->getUInt( 1 ), - itemInfo->modelMain, - itemInfo->modelSub, - isHq ); + ItemPtr pItem = make_Item( uId, itemRes->getUInt( 1 ), isHq ); pItem->setStackSize( itemRes->getUInt( 2 ) ); diff --git a/src/world/Manager/InventoryMgr.cpp b/src/world/Manager/InventoryMgr.cpp index deca4b48..b9339b0c 100644 --- a/src/world/Manager/InventoryMgr.cpp +++ b/src/world/Manager/InventoryMgr.cpp @@ -75,8 +75,7 @@ Sapphire::ItemPtr Sapphire::World::Manager::InventoryMgr::createItem( Entity::Pl if( !itemInfo ) return nullptr; - auto item = make_Item( Items::Util::getNextUId(), catalogId, - itemInfo->modelMain, itemInfo->modelSub ); + auto item = make_Item( Items::Util::getNextUId(), catalogId ); item->setStackSize( std::max< uint32_t >( 1, quantity ) );