From 3cd2be8ea99ca1b999d2a94bc79601acd87a97d6 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 12:16:15 +0000 Subject: [PATCH] Decompile fn_22080 (CGameMode::ReceiveTraitStatusChangeAck) Batch #7846 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_22080 CGameMode::ReceiveTraitStatusChangeAck: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Yommy 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/GameModeNotices.cpp | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index 4e1a806a..131c6182 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -562,6 +562,7 @@ public: void ReceiveWindow348Result(unsigned char result, std::int16_t index); void ReceiveRodexItemReturn(const unsigned char* packet); void ReceiveExpGainNotice(const unsigned char* packet); + void ReceiveTraitStatusChangeAck(unsigned char result, unsigned short statusId, unsigned char value); void ReceiveBankDepositAck(const unsigned char* packet); void ReceiveBankWithdrawAck(const unsigned char* packet); void ReceiveBankCheck(const unsigned char* packet); diff --git a/Source/Client/Mode/GameModeNotices.cpp b/Source/Client/Mode/GameModeNotices.cpp index 635f0c4e..3305f826 100644 --- a/Source/Client/Mode/GameModeNotices.cpp +++ b/Source/Client/Mode/GameModeNotices.cpp @@ -45,13 +45,13 @@ #include "UI/UIMacroDetectorWnd.h" #include "UI/UIMacroUserInfoWnd.h" #include "UI/UIRefiningWnd.h" +#include "UI/Status/UIStatusWnd.h" #include "UI/Window/UINewSelectCharWnd.h" #include "UI/Window/UIRodexContentsWnd.h" #include "UI/Window/UIWindow.h" #include "UI/Window/UIWindowMgr.h" #include "UI/Window/WindowDialogs.h" #include "Utility/Text/FormatString.h" - #include #include #include @@ -3068,3 +3068,16 @@ static void FillVendingItem(ITEM_INFO& item, const VendingItemRecord2& record) { } // OFFSET: 0x00D70790 + +// OFFSET: 0x00D6C410 +// FUNCTION: fn_22080 +void CGameMode::ReceiveTraitStatusChangeAck(unsigned char result, unsigned short statusId, unsigned char value) { + this->unknown_02D4 = 0; + if (result == 1) { + std::map& traitStats = reinterpret_cast&>(g_session.unknown_7FC0); + traitStats[statusId] = value; + if (UIStatusWnd* window = reinterpret_cast(g_windowMgr.unknown_01C4)) { + window->ValidatePlacement(); + } + } +}