Decompile fn_21850 (CGameMode::ReceiveVendingItemSoldNow)

Batch #7981 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_21850 CGameMode::ReceiveVendingItemSoldNow: logic confirmed by peer review

Peer-reviewed-by: Yommy, pedrao
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-10-31 13:20:50 +00:00
commit 24bd8692f1
2 changed files with 11 additions and 0 deletions

View file

@ -588,10 +588,12 @@ public:
void ReceiveTypedItemList(const unsigned char* packet);
void ReceiveVendingItemList(int aid, int storeId, char own, int count, std::uint32_t duration, const unsigned char* data, int value, int unused);
void ReceiveVendingItemList2(int aid, int storeId, char own, int count, std::uint32_t duration, const unsigned char* data);
void ReceiveVendingItemSoldNow(const unsigned char* data);
};
void LaunchRollingCutterEffect(CGameActor* actor);
void __stdcall sub_CDBC30(const vector3d* position, int actorId, float scale, int job);
void __stdcall sub_D08670(int field14, int itemId, int quantity, int field8, int fieldC, int field10);
#if defined(_WIN32) && !defined(_WIN64)
static_assert(offsetof(CGameMode, mapName) == 0x68);

View file

@ -3067,6 +3067,15 @@ static void FillVendingItem(ITEM_INFO& item, const VendingItemRecord2& record) {
item.unknown_0070 = record.sprite;
}
// OFFSET: 0x00D47720
// FUNCTION: fn_21850
void CGameMode::ReceiveVendingItemSoldNow(const unsigned char* data) {
const int itemId = *reinterpret_cast<const int*>(data + 2);
const short quantity = *reinterpret_cast<const short*>(data + 6);
const int field8 = *reinterpret_cast<const int*>(data + 8);
sub_D08670(static_cast<int>(_time32(nullptr)), itemId, quantity, field8, 0, 0);
}
// OFFSET: 0x00D70790
// OFFSET: 0x00D6C410