mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
@@ -216,6 +216,23 @@ struct LinkValidator<LinkTags::battlepet>
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct LinkValidator<LinkTags::battlePetAbil>
|
||||
{
|
||||
static bool IsTextValid(BattlePetAbilLinkData const& data, std::string_view text)
|
||||
{
|
||||
for (LocaleConstant i = LOCALE_enUS; i < TOTAL_LOCALES; i = LocaleConstant(i + 1))
|
||||
if (data.Ability->Name[i] == text)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool IsColorValid(BattlePetAbilLinkData const&, HyperlinkColor c)
|
||||
{
|
||||
return c == CHAT_LINK_COLOR_BATTLE_PET_ABIL;
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct LinkValidator<LinkTags::conduit>
|
||||
{
|
||||
@@ -496,15 +513,29 @@ struct LinkValidator<LinkTags::mawpower>
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct LinkValidator<LinkTags::mount>
|
||||
{
|
||||
static bool IsTextValid(MountLinkData const& data, std::string_view text)
|
||||
{
|
||||
return LinkValidator<LinkTags::spell>::IsTextValid(data.Spell, text);
|
||||
}
|
||||
|
||||
static bool IsColorValid(MountLinkData const&, HyperlinkColor c)
|
||||
{
|
||||
return c == CHAT_LINK_COLOR_SPELL;
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct LinkValidator<LinkTags::outfit>
|
||||
{
|
||||
static bool IsTextValid(std::string const&, std::string_view)
|
||||
static bool IsTextValid(std::string_view, std::string_view)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IsColorValid(std::string const&, HyperlinkColor c)
|
||||
static bool IsColorValid(std::string_view, HyperlinkColor c)
|
||||
{
|
||||
return c == CHAT_LINK_COLOR_TRANSMOG;
|
||||
}
|
||||
@@ -658,15 +689,20 @@ static bool ValidateLinkInfo(HyperlinkInfo const& info)
|
||||
{
|
||||
using namespace LinkTags;
|
||||
TryValidateAs(achievement);
|
||||
TryValidateAs(api);
|
||||
TryValidateAs(apower);
|
||||
TryValidateAs(azessence);
|
||||
TryValidateAs(area);
|
||||
TryValidateAs(areatrigger);
|
||||
TryValidateAs(battlepet);
|
||||
TryValidateAs(battlePetAbil);
|
||||
TryValidateAs(clubFinder);
|
||||
TryValidateAs(clubTicket);
|
||||
TryValidateAs(conduit);
|
||||
TryValidateAs(creature);
|
||||
TryValidateAs(creature_entry);
|
||||
TryValidateAs(currency);
|
||||
TryValidateAs(dungeonScore);
|
||||
TryValidateAs(enchant);
|
||||
TryValidateAs(gameevent);
|
||||
TryValidateAs(gameobject);
|
||||
@@ -680,6 +716,7 @@ static bool ValidateLinkInfo(HyperlinkInfo const& info)
|
||||
TryValidateAs(journal);
|
||||
TryValidateAs(keystone);
|
||||
TryValidateAs(mawpower);
|
||||
TryValidateAs(mount);
|
||||
TryValidateAs(outfit);
|
||||
TryValidateAs(player);
|
||||
TryValidateAs(pvptal);
|
||||
@@ -687,6 +724,7 @@ static bool ValidateLinkInfo(HyperlinkInfo const& info)
|
||||
TryValidateAs(skill);
|
||||
TryValidateAs(spell);
|
||||
TryValidateAs(talent);
|
||||
TryValidateAs(talentbuild);
|
||||
TryValidateAs(taxinode);
|
||||
TryValidateAs(tele);
|
||||
TryValidateAs(title);
|
||||
|
||||
Reference in New Issue
Block a user