AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
LinkValidator< LinkTags::achievement > Struct Reference

Static Public Member Functions

static bool IsTextValid (AchievementLinkData const &data, std::string_view text)
 
static bool IsColorValid (AchievementLinkData const &, HyperlinkColor c)
 

Detailed Description

Member Function Documentation

◆ IsColorValid()

static bool LinkValidator< LinkTags::achievement >::IsColorValid ( AchievementLinkData const &  ,
HyperlinkColor  c 
)
inlinestatic
126 {
127 return c == CHAT_LINK_COLOR_ACHIEVEMENT;
128 }
@ CHAT_LINK_COLOR_ACHIEVEMENT
Definition: SharedDefines.h:3214

References CHAT_LINK_COLOR_ACHIEVEMENT.

◆ IsTextValid()

static bool LinkValidator< LinkTags::achievement >::IsTextValid ( AchievementLinkData const &  data,
std::string_view  text 
)
inlinestatic
114 {
115 if (text.empty())
116 return false;
117
118 for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
119 if (text == data.Achievement->name[i])
120 return true;
121
122 return false;
123 }
@ TOTAL_LOCALES
Definition: Common.h:76
std::uint8_t uint8
Definition: Define.h:109

References Acore::Hyperlinks::AchievementLinkData::Achievement, AchievementEntry::name, and TOTAL_LOCALES.