From 797403e44ea9d073e863759d421c4fb0038f7271 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 1 Nov 2026 07:09:25 +0000 Subject: [PATCH] Decompile fn_22169 (CGameMode::ApplyRefiningMaterial) Batch #9306 by superintelligence: 0 byte-identical, 1 confirmed by peer review. - fn_22169 CGameMode::ApplyRefiningMaterial: logic confirmed by peer review Peer-reviewed-by: secret, gordaoprogramas, Bielhp Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Client/Mode/CGameMode.h | 1 + Source/Client/Mode/GameModePackets.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index 275b53f57..7ce60793c 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -840,6 +840,7 @@ public: void ProcessMouseWheel(int requireControl); void ReceiveEquipItemList34(const unsigned char* packet); void ReceiveEquipItemList38(const unsigned char* packet); + void ApplyRefiningMaterial(short itemId, unsigned char count, const unsigned char* materials, unsigned char catalystCount); }; void LaunchRollingCutterEffect(CGameActor* actor); diff --git a/Source/Client/Mode/GameModePackets.cpp b/Source/Client/Mode/GameModePackets.cpp index 68969cd49..39f6a3eb4 100644 --- a/Source/Client/Mode/GameModePackets.cpp +++ b/Source/Client/Mode/GameModePackets.cpp @@ -56,6 +56,7 @@ #include "UI/Shop/UIMerchantItemShopWnd.h" #include "UI/Window/UIWindow.h" #include "UI/Window/UIWindowMgr.h" +#include "UI/UIRefiningWnd.h" #include "UI/Dialogs/UIWaitWnd.h" #include "UI/Window/WindowDialogs.h" #include "Utility/Math/Vector3d.h" @@ -11453,3 +11454,12 @@ void CGameMode::ReceiveEquipItemList38(const unsigned char* packet) { RefreshItemWindows(&g_windowMgr); } + +// OFFSET: 0x00D79500 +// FUNCTION: fn_22169 +void CGameMode::ApplyRefiningMaterial(short itemId, unsigned char count, const unsigned char* materials, unsigned char catalystCount) { + UIRefiningWnd* window = static_cast(g_windowMgr.LookupWindow(0x127)); + if (window) { + window->ApplyItem(itemId, count, reinterpret_cast(const_cast(materials)), catalystCount); + } +}