aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Chat/ChatLink.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-06-04 22:36:17 +0200
committerShauren <shauren.trinity@gmail.com>2019-06-08 17:09:20 +0200
commit82c7b6c5688495d90c4ee5995a4ff74039348296 (patch)
tree8bdab07881f637c849b895cd764fd28e601aa577 /src/server/game/Chat/ChatLink.cpp
parent455959c6064af6f7863a6b4b57cb0ef1646bd8ef (diff)
Core/Items: Drop item random property and suffix - all random stats must be given using bonus lists
Diffstat (limited to 'src/server/game/Chat/ChatLink.cpp')
-rw-r--r--src/server/game/Chat/ChatLink.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/server/game/Chat/ChatLink.cpp b/src/server/game/Chat/ChatLink.cpp
index 88d182b0b09..95f14931869 100644
--- a/src/server/game/Chat/ChatLink.cpp
+++ b/src/server/game/Chat/ChatLink.cpp
@@ -186,35 +186,16 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
if (!CheckDelimiter(iss, DELIMITER, "item"))
return false;
- if (HasValue(iss) && !ReadInt32(iss, _randomPropertyId))
+ if (HasValue(iss) && !ReadInt32(iss, zero))
{
TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item random property id", iss.str().c_str());
return false;
}
- if (_randomPropertyId > 0)
- {
- _property = sItemRandomPropertiesStore.LookupEntry(_randomPropertyId);
- if (!_property)
- {
- TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid item property id %u in |item command", iss.str().c_str(), _randomPropertyId);
- return false;
- }
- }
- else if (_randomPropertyId < 0)
- {
- _suffix = sItemRandomSuffixStore.LookupEntry(-_randomPropertyId);
- if (!_suffix)
- {
- TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid item suffix id %u in |item command", iss.str().c_str(), -_randomPropertyId);
- return false;
- }
- }
-
if (!CheckDelimiter(iss, DELIMITER, "item"))
return false;
- if (HasValue(iss) && !ReadInt32(iss, _randomPropertySeed))
+ if (HasValue(iss) && !ReadInt32(iss, zero))
{
TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item random property seed", iss.str().c_str());
return false;
@@ -381,7 +362,8 @@ bool ItemChatLink::ValidateName(char* buffer, char const* context)
{
ChatLink::ValidateName(buffer, context);
- LocalizedString* suffixStrings = _suffix ? _suffix->Name : (_property ? _property->Name : nullptr);
+ // TODO: use suffix from ItemNameDescription
+ LocalizedString* suffixStrings = nullptr;
for (uint8 locale = LOCALE_enUS; locale < TOTAL_LOCALES; ++locale)
{