aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Texts/CreatureTextMgr.cpp
diff options
context:
space:
mode:
authorModoX <moardox@gmail.com>2021-10-16 15:02:40 +0200
committerGitHub <noreply@github.com>2021-10-16 15:02:40 +0200
commite63c5e425383fd8e12dcff2302f9c77d0aa5db2c (patch)
tree6aceb11ce600179c8384d236ab7b32543e22a32d /src/server/game/Texts/CreatureTextMgr.cpp
parent145a75dea6529f07d2875952658b59b34024251a (diff)
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
Diffstat (limited to 'src/server/game/Texts/CreatureTextMgr.cpp')
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp8
1 files changed, 7 insertions, 1 deletions
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;