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
127 {
128 return c == CHAT_LINK_COLOR_ACHIEVEMENT;
129 }
@ 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
115 {
116 if (text.empty())
117 return false;
118
119 for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
120 if (text == data.Achievement->name[i])
121 return true;
122
123 return false;
124 }
@ TOTAL_LOCALES
Definition: Common.h:76
std::uint8_t uint8
Definition: Define.h:109

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