NetProcessIn.cpp

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
1.3 kB
56
Indexable
Never
#ifdef CONFIG_OLD_ITEM_MALL
        //87EF26
        if(btType == 0x18) {
            UINT16 usShopGroupId = msg.Read<UINT16>();
            BYTE btGroupIndex = msg.Read<BYTE>();
            BYTE btTabIndex = msg.Read<BYTE>();
            BYTE btSlotIndex = msg.Read<BYTE>();
            BYTE btSlotsCount = msg.Read<BYTE>();

            std::vector<BYTE> vSlots;

            for(int i = 0; i < btSlotsCount; i++) {
                BYTE btSlot = msg.Read<BYTE>();
                vSlots.push_back(btSlot);
            }

            UINT16 usQuantity = msg.Read<UINT16>();

            CSOItemPackage* pSOItemPackage = g_CGlobalDataManager->GetSOPackageByShopData(usShopGroupId,btGroupIndex, btTabIndex, btSlotIndex);

            int nQuantity = pSOItemPackage->GetPackageItemData()->m_vScrapData[0]->m_quantity;

            if(pSOItemPackage &&
                pSOItemPackage->GetSOItem()) {
                for(int i = 0; i < vSlots.size(); i++) {

                    g_pCGInterface->GetMainPopup()->GetInventory()->FakePick(pSOItemPackage->GetSOItem()->m_refObjItemId, vSlots[i],
                                                                             nQuantity > 0 ? nQuantity : 1);
                }
            }

            msg.FlushRemaining();
            return;
        }
#endif
Leave a Comment