fix(Core/ChatHandler): SPELL_AURA_MOD_LANGUAGE should affect only Say… (#17465)

fix(Core/ChatHandler): SPELL_AURA_MOD_LANGUAGE should affect only Say and Yell
This commit is contained in:
avarishd
2023-10-10 16:15:48 +03:00
committed by GitHub
parent c2f03441c8
commit 43be5db44c

View File

@@ -225,9 +225,9 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
break;
}
}
// but overwrite it by SPELL_AURA_MOD_LANGUAGE auras (only single case used)
// Overwritten by SPELL_AURA_MOD_LANGUAGE auras (Affects only Say and Yell)
Unit::AuraEffectList const& ModLangAuras = sender->GetAuraEffectsByType(SPELL_AURA_MOD_LANGUAGE);
if (!ModLangAuras.empty())
if (!ModLangAuras.empty() && (type == CHAT_MSG_SAY || type == CHAT_MSG_YELL))
lang = ModLangAuras.front()->GetMiscValue();
}