113 TC_LOG_TRACE(
"chat.system",
"ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item entry", iss.str().c_str());
121 TC_LOG_TRACE(
"chat.system",
"ChatHandler::isValidChatMessage('%s'): got invalid itemEntry %u in |item command", iss.str().c_str(), itemEntry);
132 TC_LOG_TRACE(
"chat.system",
"ChatHandler::isValidChatMessage('%s'): linked item has color %u, but user claims %u", iss.str().c_str(),
ItemQualityColors[colorQuality],
_color);
137 uint8 const propsCount = 11;
138 uint8 const randomPropertyPosition = 5;
139 uint8 const numBonusListIDsPosition = 10;
140 uint8 const maxBonusListIDs = 100;
141 for (
uint8 index = 0; index < propsCount; ++index)
149 TC_LOG_TRACE(
"chat.system",
"ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item property (%u)", iss.str().c_str(), index);
152 if (
id && (index == randomPropertyPosition))
160 TC_LOG_TRACE(
"chat.system",
"ChatHandler::isValidChatMessage('%s'): got invalid item property id %u in |item command", iss.str().c_str(), id);
169 TC_LOG_TRACE(
"chat.system",
"ChatHandler::isValidChatMessage('%s'): got invalid item suffix id %u in |item command", iss.str().c_str(), -id);
174 if (index == numBonusListIDsPosition)
176 if (
id > maxBonusListIDs)
178 TC_LOG_TRACE(
"chat.system",
"ChatHandler::isValidChatMessage('%s'): too many item bonus list IDs %u in |item command", iss.str().c_str(), id);
196 TC_LOG_TRACE(
"chat.system",
"ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item bonus list id (%u)", iss.str().c_str(), index);
202 TC_LOG_TRACE(
"chat.system",
"ChatHandler::isValidChatMessage('%s'): got invalid item bonus list id %d in |item command", iss.str().c_str(), id);
std::vector< int32 > _bonusListIDs
Definition: ChatLink.h:73
#define sDB2Manager
Definition: DB2Stores.h:224
int32 _data[11]
Definition: ChatLink.h:72
Definition: ItemTemplate.h:254
DB2Storage< ItemRandomSuffixEntry > sItemRandomSuffixStore("ItemRandomSuffix.db2", ItemRandomSuffixFormat, HOTFIX_SEL_ITEM_RANDOM_SUFFIX)
bool ReadInt32(std::istringstream &iss, int32 &res)
Definition: ChatLink.cpp:55
uint32 _color
Definition: ChatLink.h:51
bool ReadUInt32(std::istringstream &iss, uint32 &res)
Definition: ChatLink.cpp:49
#define sObjectMgr
Definition: ObjectMgr.h:1567
#define DELIMITER
Definition: ChatLink.cpp:96
Definition: SharedDefines.h:327
#define TC_LOG_TRACE(filterType__,...)
Definition: Log.h:195
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
uint32 GetFlags3() const
Definition: ItemTemplate.h:658
ItemRandomPropertiesEntry const * _property
Definition: ChatLink.h:75
ItemRandomSuffixEntry const * _suffix
Definition: ChatLink.h:74
bool CheckDelimiter(std::istringstream &iss, char delimiter, const char *context)
Definition: ChatLink.cpp:74
DB2Storage< ItemRandomPropertiesEntry > sItemRandomPropertiesStore("ItemRandomProperties.db2", ItemRandomPropertiesFormat, HOTFIX_SEL_ITEM_RANDOM_PROPERTIES)
const uint32 ItemQualityColors[MAX_ITEM_QUALITY]
Definition: SharedDefines.h:338
uint8_t uint8
Definition: Define.h:152
ItemTemplate const * _item
Definition: ChatLink.h:71
uint32 GetQuality() const
Definition: ItemTemplate.h:655