From b1e2b8866da6a672bec285c11c9b66dfd4701f6b Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 28 Mar 2026 15:42:01 -0700 Subject: [PATCH] fix: use faction-correct language for outgoing chat (COMMON vs ORCISH) Chat was always sent with COMMON (7) language. For Horde players, AzerothCore rejects COMMON and silently drops the message. Alliance players nearby also couldn't see Horde messages. Now detects player race and sends ORCISH (1) for Horde races, COMMON (7) for Alliance. This matches what the real WoW client sends. --- src/game/chat_handler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/game/chat_handler.cpp b/src/game/chat_handler.cpp index 02ccd11e..93105454 100644 --- a/src/game/chat_handler.cpp +++ b/src/game/chat_handler.cpp @@ -122,7 +122,12 @@ void ChatHandler::sendChatMessage(ChatType type, const std::string& message, con LOG_INFO("Sending chat message: [", getChatTypeString(type), "] ", message); - ChatLanguage language = ChatLanguage::COMMON; + // Use the player's faction language. AzerothCore rejects wrong language. + // Alliance races: Human(1), Dwarf(3), NightElf(4), Gnome(7), Draenei(11) → COMMON (7) + // Horde races: Orc(2), Undead(5), Tauren(6), Troll(8), BloodElf(10) → ORCISH (1) + uint8_t race = owner_.getPlayerRace(); + bool isHorde = (race == 2 || race == 5 || race == 6 || race == 8 || race == 10); + ChatLanguage language = isHorde ? ChatLanguage::ORCISH : ChatLanguage::COMMON; auto packet = MessageChatPacket::build(type, language, message, target); owner_.socket->send(packet);