mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-02 16:57:47 +00:00
remove model params from item constructor
This commit is contained in:
parent
c6232f2395
commit
19017f6e12
7 changed files with 9 additions and 17 deletions
|
@ -249,8 +249,8 @@ namespace Sapphire::Common
|
|||
|
||||
|
||||
// housing exterior containers
|
||||
HousingExteriorPlacedItems = 25001,
|
||||
HousingExteriorAppearance = 25000,
|
||||
HousingExteriorPlacedItems = 25001,
|
||||
HousingExteriorStoreroom = 27000,
|
||||
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 ) );
|
||||
|
||||
|
|
|
@ -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 ) );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue