aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Chat/ChatLink.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2018-11-12 23:27:28 +0100
committerShauren <shauren.trinity@gmail.com>2018-11-12 23:27:28 +0100
commit5bfb1cc960edd74716d3d0c65dd5aaf1ce34aa43 (patch)
tree3810a801610f659ac1b651566a37e9f93eb6c21d /src/server/game/Chat/ChatLink.cpp
parentd087f113ca831efb28810e08be68385f871687a8 (diff)
Core/Chat: Updated quest chat link format
Diffstat (limited to 'src/server/game/Chat/ChatLink.cpp')
-rw-r--r--src/server/game/Chat/ChatLink.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp
index 2f1cc1162f7..6cfec8193e5 100644
--- a/src/server/game/Chat/ChatLink.cpp
+++ b/src/server/game/Chat/ChatLink.cpp
@@ -40,7 +40,8 @@
// - client, item icon shift click
// |color|Hitemset:itemset_id|h[name]|h|r
// |color|Hplayer:name|h[name]|h|r - client, in some messages, at click copy only name instead link
-// |color|Hquest:quest_id:quest_level|h[name]|h|r - client, quest list name shift-click
+// |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
+// - client, quest list name shift-click
// |color|Hskill:skill_id|h[name]|h|r
// |color|Hspell:spell_id|h[name]|h|r - client, spellbook spell icon shift-click
// |color|Htalent:talent_id, rank|h[name]|h|r - client, talent icon shift-click
@@ -395,8 +396,8 @@ bool ItemChatLink::ValidateName(char* buffer, char const* context)
return false;
}
-// |color|Hquest:quest_id:quest_level|h[name]|h|r
-// |cff808080|Hquest:2278:47|h[The Platinum Discs]|h|r
+// |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
+// |cffffff00|Hquest:51101:-1:110:120:5|h[The Wounded King]|h|r
bool QuestChatLink::Initialize(std::istringstream& iss)
{
// Read quest id
@@ -428,6 +429,21 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): quest level %d is too big", iss.str().c_str(), _questLevel);
return false;
}
+ if (!ReadInt32(iss, _minLevel))
+ {
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest min level", iss.str().c_str());
+ return false;
+ }
+ if (!ReadInt32(iss, _maxLevel))
+ {
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest max level", iss.str().c_str());
+ return false;
+ }
+ if (!ReadInt32(iss, _scalingFaction))
+ {
+ TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest scaling faction", iss.str().c_str());
+ return false;
+ }
return true;
}