Decompile fn_22154 (ReceiveTradeItems)
Batch #7277 by superintelligence: 0 byte-identical, 1 confirmed by peer review. - fn_22154 ReceiveTradeItems: logic confirmed by peer review Peer-reviewed-by: meitogi, alisonrag, gordaoprogramas, Romain, aDw Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
2203e8a78b
commit
d3098e48a3
1 changed files with 32 additions and 0 deletions
|
|
@ -2783,6 +2783,38 @@ void CGameMode::ReceiveItem1718List(const unsigned char* packet) {
|
|||
}
|
||||
|
||||
// OFFSET: 0x00D77C90
|
||||
// FUNCTION: fn_22154
|
||||
void ReceiveTradeItems(int count, const TradeItemRecord* records) {
|
||||
reinterpret_cast<SessionItemLists*>(&g_session)->ClearTradeItems();
|
||||
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const TradeItemRecord& record = records[i];
|
||||
ITEM_INFO item;
|
||||
item.SetItemId(record.itemId);
|
||||
item.unknown_0000[0] = record.unknown_0004;
|
||||
item.unknown_006C = record.unknown_000D / 10;
|
||||
item.quantity = record.quantity;
|
||||
item.unknown_0014[0] = record.unknown_0005;
|
||||
item.unknown_0014[1] = record.unknown_0005;
|
||||
item.unknown_0060 = record.unknown_000F;
|
||||
std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards));
|
||||
item.unknown_0000[1] = record.unknown_0020;
|
||||
item.identified = 1;
|
||||
item.unknown_0074[3] = 1;
|
||||
if (item.quantity > 0) {
|
||||
reinterpret_cast<ClientItemLists*>(&g_session)->AppendItem1718(item);
|
||||
}
|
||||
}
|
||||
|
||||
if (UIWindow* window = g_windowMgr.EnsureWindow(0xfe)) {
|
||||
window->SendMsg(nullptr, 0x24, 0, 0, 0, 0);
|
||||
window->SendMsg(nullptr, 0x17, 0, 0, 0, 0);
|
||||
}
|
||||
if (UIWindow* window = g_windowMgr.EnsureWindow(0xff)) {
|
||||
window->SendMsg(nullptr, 0x24, 0, 0, 0, 0);
|
||||
window->SendMsg(nullptr, 0x17, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00D7A690
|
||||
// FUNCTION: fn_22191
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue