From e63c5e425383fd8e12dcff2302f9c77d0aa5db2c Mon Sep 17 00:00:00 2001 From: ModoX Date: Sat, 16 Oct 2021 15:02:40 +0200 Subject: Core/Chat: Added new TextRange personal to creature_text which sends the message to related target only (#27070) * also updated creature_texts of Vigilant Quoram in Lightforged Intro zone as an example --- src/server/game/Texts/CreatureTextMgr.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/server/game/Texts/CreatureTextMgr.cpp') diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 3f2cdb660eb..86a6aae3306 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -112,7 +112,7 @@ void CreatureTextMgr::LoadCreatureTexts() } } - if (temp.TextRange > TEXT_RANGE_WORLD) + if (temp.TextRange > TEXT_RANGE_PERSONAL) { TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u, Id %u in table `creature_text` has incorrect TextRange %u.", temp.creatureId, temp.groupId, temp.id, temp.TextRange); temp.TextRange = TEXT_RANGE_NORMAL; @@ -333,6 +333,12 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const* player->SendDirectMessage(data); return; } + case TEXT_RANGE_PERSONAL: + if (!whisperTarget || !whisperTarget->IsPlayer()) + return; + + whisperTarget->ToPlayer()->SendDirectMessage(data); + return; case TEXT_RANGE_NORMAL: default: break; -- cgit v1.2.3