135 {
137
138 std::array<char const*, 16> const* randomSuffixes = nullptr;
139
140 if (data.RandomProperty)
141 randomSuffixes = &data.RandomProperty->Name;
142 else if (data.RandomSuffix)
143 randomSuffixes = &data.RandomSuffix->Name;
144
145 if (data.IsBuggedInspectLink)
146 randomSuffixes = nullptr;
147
149 {
151 continue;
152
154 if (name.empty())
155 continue;
156
157 if (randomSuffixes)
158 {
159 std::string_view randomSuffix((*randomSuffixes)[i]);
160 if ((!randomSuffix.empty()) &&
161 (text.length() == (name.length() + 1 + randomSuffix.length())) &&
162 (text.substr(0, name.length()) == name) &&
163 (text[name.length()] == ' ') &&
164 (text.substr(name.length() + 1) == randomSuffix))
165 return true;
166 }
167 else if (text == name)
168 return true;
169 }
170 return false;
171 }
@ 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:1623
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:1405