136 {
138
139 std::array<char const*, 16> const* randomSuffixes = nullptr;
140
141 if (data.RandomProperty)
142 randomSuffixes = &data.RandomProperty->Name;
143 else if (data.RandomSuffix)
144 randomSuffixes = &data.RandomSuffix->Name;
145
146 if (data.IsBuggedInspectLink)
147 randomSuffixes = nullptr;
148
150 {
152 continue;
153
155 if (name.empty())
156 continue;
157
158 if (randomSuffixes)
159 {
160 std::string_view randomSuffix((*randomSuffixes)[i]);
161 if ((!randomSuffix.empty()) &&
162 (text.length() == (name.length() + 1 + randomSuffix.length())) &&
163 (text.substr(0, name.length()) == name) &&
164 (text[name.length()] == ' ') &&
165 (text.substr(name.length() + 1) == randomSuffix))
166 return true;
167 }
168 else if (text == name)
169 return true;
170 }
171 return false;
172 }
@ TOTAL_LOCALES
Definition: Common.h:76
#define DEFAULT_LOCALE
Definition: Common.h:79
std::uint8_t uint8
Definition: Define.h:109
#define sObjectMgr
Definition: ObjectMgr.h:1635
Definition: ItemTemplate.h:838
std::vector< std::string > Name
Definition: ItemTemplate.h:839
static std::string_view GetLocaleString(std::vector< std::string > const &data, std::size_t locale)
Definition: ObjectMgr.h:1407