mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
add silent param to not send item obtain actrl
This commit is contained in:
parent
d4695a7b75
commit
8b6286230a
2 changed files with 5 additions and 4 deletions
|
@ -479,7 +479,7 @@ bool Core::Inventory::isObtainable( uint32_t catalogId, uint8_t quantity )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int16_t Core::Inventory::addItem( uint16_t inventoryId, int8_t slotId, uint32_t catalogId, uint16_t quantity, bool isHq )
|
int16_t Core::Inventory::addItem( uint16_t inventoryId, int8_t slotId, uint32_t catalogId, uint16_t quantity, bool isHq, bool silent )
|
||||||
{
|
{
|
||||||
auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >();
|
auto pDb = g_fw.get< Db::DbWorkerPool< Db::CharaDbConnection > >();
|
||||||
auto pExdData = g_fw.get< Data::ExdDataGenerated >();
|
auto pExdData = g_fw.get< Data::ExdDataGenerated >();
|
||||||
|
@ -531,7 +531,8 @@ int16_t Core::Inventory::addItem( uint16_t inventoryId, int8_t slotId, uint32_t
|
||||||
invUpPacket.data().condition = 30000;
|
invUpPacket.data().condition = 30000;
|
||||||
m_pOwner->queuePacket( invUpPacket );
|
m_pOwner->queuePacket( invUpPacket );
|
||||||
|
|
||||||
m_pOwner->queuePacket( ActorControlPacket143( m_pOwner->getId(), ItemObtainIcon, catalogId, item->getStackSize() ) );
|
if( !silent )
|
||||||
|
m_pOwner->queuePacket( ActorControlPacket143( m_pOwner->getId(), ItemObtainIcon, catalogId, item->getStackSize() ) );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -623,7 +624,7 @@ void Core::Inventory::splitItem( uint16_t fromInventoryId, uint8_t fromSlotId, u
|
||||||
// todo: correct invalid move? again, not sure what retail does here
|
// todo: correct invalid move? again, not sure what retail does here
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto newSlot = addItem( toInventoryId, toSlot, fromItem->getId(), itemCount, fromItem->isHq() );
|
auto newSlot = addItem( toInventoryId, toSlot, fromItem->getId(), itemCount, fromItem->isHq(), true );
|
||||||
if( newSlot == -1 )
|
if( newSlot == -1 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ public:
|
||||||
|
|
||||||
InvSlotPairVec getSlotsOfItemsInInventory( uint32_t catalogId );
|
InvSlotPairVec getSlotsOfItemsInInventory( uint32_t catalogId );
|
||||||
InvSlotPair getFreeBagSlot();
|
InvSlotPair getFreeBagSlot();
|
||||||
int16_t addItem( uint16_t inventoryId, int8_t slotId, uint32_t catalogId, uint16_t quantity = 1, bool isHq = false );
|
int16_t addItem( uint16_t inventoryId, int8_t slotId, uint32_t catalogId, uint16_t quantity = 1, bool isHq = false, bool silent = false );
|
||||||
void moveItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot );
|
void moveItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot );
|
||||||
void swapItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot );
|
void swapItem( uint16_t fromInventoryId, uint8_t fromSlotId, uint16_t toInventoryId, uint8_t toSlot );
|
||||||
void discardItem( uint16_t fromInventoryId, uint8_t fromSlotId );
|
void discardItem( uint16_t fromInventoryId, uint8_t fromSlotId );
|
||||||
|
|
Loading…
Add table
Reference in a new issue