Maintenance: Revert 18381 regression: ProcessBuyingStorePurchase is a CGameMode member (callers pass this in ECX); define it as CGame

Batch #18427 by ragnarok-clanker: forced by an admin (0 lower score(s), 2 changed function(s)); checked with 197 compiled unit(s), including every includer of Source/Client/Mode/CGameMode.h.
This commit is contained in:
ragnarok-clanker 2026-11-12 14:59:41 +00:00
commit 71d3e375a9
3 changed files with 4 additions and 4 deletions

View file

@ -822,6 +822,7 @@ public:
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 ProcessBuyingStorePurchase(int updateTime, int itemId, int amount, int zeny, int zenyLimit, int charId);
void ReceiveBuyingStorePurchase(const unsigned char* packet);
void ReceiveFriendAddResult(const unsigned char* data);
void ReceiveNavigation(const unsigned char* packet);
@ -1036,6 +1037,5 @@ int CountItemRandomOptions(const unsigned char* entries);
void TraceSelection(int selection);
void TraceSelectionRange(int first, int last);
void WriteMyLog(const char* file, int line, const char* format, ...);
void __stdcall ProcessBuyingStorePurchase(int updateTime, int itemId, int amount, int zeny, int zenyLimit, int charId);
#endif

View file

@ -3950,7 +3950,7 @@ static __forceinline void FillVendingItem(ITEM_INFO& item, const VendingItemReco
// OFFSET: 0x00D47720
// FUNCTION: fn_21850
void CGameMode::ReceiveVendingItemSoldNow(const unsigned char* data) {
ProcessBuyingStorePurchase(static_cast<int>(_time32(nullptr)), *reinterpret_cast<const int*>(data + 2),
this->ProcessBuyingStorePurchase(static_cast<int>(_time32(nullptr)), *reinterpret_cast<const int*>(data + 2),
*reinterpret_cast<const short*>(data + 6), *reinterpret_cast<const int*>(data + 8), 0, 0);
}

View file

@ -1977,7 +1977,7 @@ void __stdcall ProcessVendingSale(int field8, int itemIdWord, int quantityWord,
// OFFSET: 0x00D08670
// FUNCTION: fn_21592
void __declspec(noinline) __stdcall ProcessBuyingStorePurchase(int updateTime, int itemId, int amount, int zeny, int zenyLimit, int charId) {
__declspec(noinline) void CGameMode::ProcessBuyingStorePurchase(int updateTime, int itemId, int amount, int zeny, int zenyLimit, int charId) {
ITEM_INFO item = g_session.FindItem1758ByItemId(itemId);
item.SetItemId(itemId);
item.quantity = amount;
@ -2003,7 +2003,7 @@ void __declspec(noinline) __stdcall ProcessBuyingStorePurchase(int updateTime, i
// OFFSET: 0x00D08640
// FUNCTION: fn_21591
__declspec(noinline) void CGameMode::ReceiveBuyingStorePurchase(const unsigned char* packet) {
ProcessBuyingStorePurchase(
this->ProcessBuyingStorePurchase(
*reinterpret_cast<const int*>(packet + 0x14),
*reinterpret_cast<const int*>(packet + 2),
*reinterpret_cast<const short*>(packet + 6),