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).
This commit is contained in:
ragnarok-clanker 2026-10-30 16:49:03 +00:00
commit 33c8f8256f

View file

@ -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<UIEmotionWnd*>(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