AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::Hyperlinks::LinkTags::trade Struct Reference

#include "Hyperlinks.h"

Public Types

using value_type = TradeskillLinkData const &
 

Static Public Member Functions

static constexpr std::string_view tag ()
 
static bool StoreTo (TradeskillLinkData &val, std::string_view data)
 

Detailed Description

Member Typedef Documentation

◆ value_type

Member Function Documentation

◆ StoreTo()

bool Acore::Hyperlinks::LinkTags::trade::StoreTo ( TradeskillLinkData val,
std::string_view  data 
)
static
250{
252 uint32 spellId;
253
254 if (!t.TryConsumeTo(spellId))
255 return false;
256
257 val.Spell = sSpellMgr->GetSpellInfo(spellId);
258
259 return (val.Spell && val.Spell->Effects[0].Effect == SPELL_EFFECT_TRADE_SKILL && t.TryConsumeTo(val.CurValue) &&
260 t.TryConsumeTo(val.MaxValue) && t.TryConsumeTo(val.Owner) && t.TryConsumeTo(val.KnownRecipes) && t.IsEmpty());
261}
std::uint32_t uint32
Definition: Define.h:107
#define sSpellMgr
Definition: SpellMgr.h:825
@ SPELL_EFFECT_TRADE_SKILL
Definition: SharedDefines.h:825
Definition: HyperlinkTags.cpp:28

References Acore::Hyperlinks::TradeskillLinkData::CurValue, SpellInfo::Effects, HyperlinkDataTokenizer::IsEmpty(), Acore::Hyperlinks::TradeskillLinkData::KnownRecipes, Acore::Hyperlinks::TradeskillLinkData::MaxValue, Acore::Hyperlinks::TradeskillLinkData::Owner, Acore::Hyperlinks::TradeskillLinkData::Spell, SPELL_EFFECT_TRADE_SKILL, sSpellMgr, and HyperlinkDataTokenizer::TryConsumeTo().

◆ tag()

static constexpr std::string_view Acore::Hyperlinks::LinkTags::trade::tag ( )
inlinestaticconstexpr
213{ return "trade"; }