From 33c8f8256ffdfc21c980dc0c82b71bd9b3fa323f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 16:49:03 +0000 Subject: [PATCH] Decompile fn_02846 (CCashEmotionAction_Register::Execute) Batch #5586 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_02846 CCashEmotionAction_Register::Execute: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, willerthal, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/CashEmotionMgr.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Source/Contents/CashEmotionMgr.cpp b/Source/Contents/CashEmotionMgr.cpp index 72b40cc2..37e1c895 100644 --- a/Source/Contents/CashEmotionMgr.cpp +++ b/Source/Contents/CashEmotionMgr.cpp @@ -339,6 +339,30 @@ bool CCashEmotionAction_Play::Execute(int packId, int emotionId) { } // OFFSET: 0x00591F30 +// FUNCTION: fn_02846 +bool CCashEmotionAction_Register::Execute(int packId, int emotionId) { + if (packId < 0 || emotionId < 0) { + return false; + } + + const char* name = g_cashEmotionMgr->GetEmotionName(packId, emotionId); + if (!name) { + return false; + } + + if (auto* emotionWnd = reinterpret_cast(g_windowMgr.unknown_0380)) { + emotionWnd->SetMacroText(name, -1); + return true; + } + + ChatSuggestions* suggestions = g_chatSuggestions; + if (suggestions && suggestions->input) { + suggestions->input->SetText(name); + suggestions->input->Slot39(); + } + + return true; +} // OFFSET: 0x00591FB0 // FUNCTION: fn_02847