Can you tell me how to make all my pets inside my inventory using the function clear inventory function? The problem is it's only deleting the general items.
Thanks in advance
Thanks in advance
BOOL TextCmd_InvenRemove( CScanner& scanner )
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)scanner.dwValue;
if( IsValidObj( pUser ) )
{
int nSize = pUser->m_Inventory.GetMax();
for( int i = 0 ; i < nSize; ++i )
{
CItemElem* pItemElem = pUser->m_Inventory.GetAtId( i );
if( IsUsableItem( pItemElem ) && !pUser->m_Inventory.IsEquip( pItemElem->m_dwObjId ) && !pItemElem->IsPet() && !pItemElem->IsEatPet() )
pUser->UpdateItem( i, UI_NUM, 0 );
}
}
#endif // __WORLDSERVER
return TRUE;
}
BOOL TextCmd_InvenRemove( CScanner& scanner )
{
#ifdef __WORLDSERVER
CUser* pUser = (CUser*)scanner.dwValue;
if( IsValidObj( pUser ) )
{
int nSize = pUser->m_Inventory.GetMax();
for( int i = 0 ; i < nSize; ++i )
{
CItemElem* pItemElem = pUser->m_Inventory.GetAtId( i );
if( IsUsableItem( pItemElem ) && !pUser->m_Inventory.IsEquip( pItemElem->m_dwObjId ) )
pUser->UpdateItem( i, UI_NUM, 0 );
}
}
#endif // __WORLDSERVER
return TRUE;
}