18#ifndef TRINITY_HYPERLINKS_H
19#define TRINITY_HYPERLINKS_H
109 static bool StoreTo(std::string_view& val, std::string_view data)
115 static bool StoreTo(std::string& val, std::string_view data)
121 template <
typename T>
122 static std::enable_if_t<std::is_integral_v<T>,
bool>
StoreTo(T& val, std::string_view data)
145 #define make_base_tag(ltag, type) struct ltag : public base_tag { using value_type = type; static constexpr std::string_view tag() { return #ltag; } }
164 static constexpr std::string_view
tag() {
return "achievement"; }
171 static constexpr std::string_view
tag() {
return "enchant"; }
172 static bool StoreTo(
SpellInfo const*& val, std::string_view data);
178 static constexpr std::string_view
tag() {
return "glyph"; };
179 static bool StoreTo(
GlyphLinkData& val, std::string_view data);
185 static constexpr std::string_view
tag() {
return "item"; }
186 static bool StoreTo(
ItemLinkData& val, std::string_view data);
192 static constexpr std::string_view
tag() {
return "quest"; }
193 static bool StoreTo(
QuestLinkData& val, std::string_view data);
199 static constexpr std::string_view
tag() {
return "spell"; }
200 static bool StoreTo(
SpellInfo const*& val, std::string_view data);
206 static constexpr std::string_view
tag() {
return "talent"; }
213 static constexpr std::string_view
tag() {
return "trade"; }
226 if (((c >>= 8) & 0xff) ^
g)
228 if (((c >>= 8) & 0xff) ^
r)
239 HyperlinkInfo(std::string_view t,
uint32 c, std::string_view ta, std::string_view d, std::string_view te) :
242 explicit operator bool() {
return ok; }
246 std::string_view
const tag;
#define make_base_tag(ltag, type)
std::optional< T > Optional
Optional helper class to wrap optional values within.
void SetRawValue(uint64 guid)
bool TC_GAME_API CheckAllLinks(std::string_view str)
HyperlinkInfo TC_GAME_API ParseSingleHyperlink(std::string_view str)
std::array< uint32, 4 > Criteria
AchievementEntry const * Achievement
GlyphPropertiesEntry const * Glyph
GlyphSlotEntry const * Slot
bool operator==(uint32 c) const
std::string_view const data
std::string_view const text
std::string_view const tag
HyperlinkInfo(std::string_view t, uint32 c, std::string_view ta, std::string_view d, std::string_view te)
std::string_view const tail
HyperlinkColor const color
ItemRandomSuffixEntry const * RandomSuffix
uint32 RandomSuffixBaseAmount
ItemRandomPropertiesEntry const * RandomProperty
ItemTemplate const * Item
std::array< uint32, 3 > GemEnchantId
TalentEntry const * Talent