From f4d068abcf0cd3c2d98cbca5b5fe64142e78af8d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 10:47:43 +0000 Subject: [PATCH] Decompile fn_02967 (CCashEmotionMgr::LookupSpecialEmotion) Batch #18016 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_02967 CCashEmotionMgr::LookupSpecialEmotion: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Yommy, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Contents/CashEmotion/CashEmotionMgr.cpp | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Source/Contents/CashEmotion/CashEmotionMgr.cpp b/Source/Contents/CashEmotion/CashEmotionMgr.cpp index 3d4b6eab8..b5a3968a3 100644 --- a/Source/Contents/CashEmotion/CashEmotionMgr.cpp +++ b/Source/Contents/CashEmotion/CashEmotionMgr.cpp @@ -1076,20 +1076,32 @@ void CCashEmotionMgr::LoadScripts() { int CCashEmotionMgr::LookupSpecialEmotion(CashEmotionSpecial type) { switch (type) { case CashEmotionSpecial::ChatProhibit: { - auto it = this->m_emotionIds.find("ET_CHAT_PROHIBIT"); - int emotionId = it != this->m_emotionIds.end() ? it->second : -1; + int emotionId; + { + std::string key("ET_CHAT_PROHIBIT"); + auto it = this->m_emotionIds.find(key); + emotionId = it != this->m_emotionIds.end() ? it->second : -1; + } this->m_specials.emplace(type, emotionId); return emotionId; } case CashEmotionSpecial::Yut: { - auto it = this->m_emotionIds.find("ET_YUT1"); - int emotionId = it != this->m_emotionIds.end() ? it->second : -1; + int emotionId; + { + std::string key("ET_YUT1"); + auto it = this->m_emotionIds.find(key); + emotionId = it != this->m_emotionIds.end() ? it->second : -1; + } this->m_specials.emplace(type, emotionId); return emotionId; } case CashEmotionSpecial::Dice: { - auto it = this->m_emotionIds.find("ET_DICE1"); - int emotionId = it != this->m_emotionIds.end() ? it->second : -1; + int emotionId; + { + std::string key("ET_DICE1"); + auto it = this->m_emotionIds.find(key); + emotionId = it != this->m_emotionIds.end() ? it->second : -1; + } this->m_specials.emplace(type, emotionId); return emotionId; }