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