TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EmblemInfo Class Reference

#include <Guild.h>

Public Member Functions

 EmblemInfo ()
 
bool LoadFromDB (Field *fields)
 
void SaveToDB (ObjectGuid::LowType guildId) const
 
void ReadPacket (WorldPackets::Guild::SaveGuildEmblem &packet)
 
bool ValidateEmblemColors ()
 
uint32 GetStyle () const
 
uint32 GetColor () const
 
uint32 GetBorderStyle () const
 
uint32 GetBorderColor () const
 
uint32 GetBackgroundColor () const
 

Private Attributes

uint32 m_style
 
uint32 m_color
 
uint32 m_borderStyle
 
uint32 m_borderColor
 
uint32 m_backgroundColor
 

Constructor & Destructor Documentation

EmblemInfo::EmblemInfo ( )
inline
uint32 m_backgroundColor
Definition: Guild.h:285
uint32 m_color
Definition: Guild.h:282
uint32 m_style
Definition: Guild.h:281
uint32 m_borderColor
Definition: Guild.h:284
uint32 m_borderStyle
Definition: Guild.h:283

Member Function Documentation

uint32 EmblemInfo::GetBackgroundColor ( ) const
inline
278 { return m_backgroundColor; }
uint32 m_backgroundColor
Definition: Guild.h:285

+ Here is the caller graph for this function:

uint32 EmblemInfo::GetBorderColor ( ) const
inline
277 { return m_borderColor; }
uint32 m_borderColor
Definition: Guild.h:284

+ Here is the caller graph for this function:

uint32 EmblemInfo::GetBorderStyle ( ) const
inline
276 { return m_borderStyle; }
uint32 m_borderStyle
Definition: Guild.h:283

+ Here is the caller graph for this function:

uint32 EmblemInfo::GetColor ( ) const
inline
275 { return m_color; }
uint32 m_color
Definition: Guild.h:282

+ Here is the caller graph for this function:

uint32 EmblemInfo::GetStyle ( ) const
inline
274 { return m_style; }
uint32 m_style
Definition: Guild.h:281

+ Here is the caller graph for this function:

bool EmblemInfo::LoadFromDB ( Field fields)
691 {
692  m_style = fields[3].GetUInt8();
693  m_color = fields[4].GetUInt8();
694  m_borderStyle = fields[5].GetUInt8();
695  m_borderColor = fields[6].GetUInt8();
696  m_backgroundColor = fields[7].GetUInt8();
697 
698  return ValidateEmblemColors();
699 }
uint32 m_backgroundColor
Definition: Guild.h:285
uint32 m_color
Definition: Guild.h:282
uint32 m_style
Definition: Guild.h:281
uint8 GetUInt8() const
Definition: Field.h:70
uint32 m_borderColor
Definition: Guild.h:284
uint32 m_borderStyle
Definition: Guild.h:283
bool ValidateEmblemColors()
Definition: Guild.cpp:682

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EmblemInfo::ReadPacket ( WorldPackets::Guild::SaveGuildEmblem packet)
674 {
675  m_style = packet.EStyle;
676  m_color = packet.EColor;
677  m_borderStyle = packet.BStyle;
678  m_borderColor = packet.BColor;
679  m_backgroundColor = packet.Bg;
680 }
uint32 m_backgroundColor
Definition: Guild.h:285
uint32 m_color
Definition: Guild.h:282
int32 EColor
Definition: GuildPackets.h:996
uint32 m_style
Definition: Guild.h:281
int32 EStyle
Definition: GuildPackets.h:994
int32 BColor
Definition: GuildPackets.h:995
int32 Bg
Definition: GuildPackets.h:997
uint32 m_borderColor
Definition: Guild.h:284
uint32 m_borderStyle
Definition: Guild.h:283
int32 BStyle
Definition: GuildPackets.h:993

+ Here is the caller graph for this function:

void EmblemInfo::SaveToDB ( ObjectGuid::LowType  guildId) const
702 {
704  stmt->setUInt32(0, m_style);
705  stmt->setUInt32(1, m_color);
706  stmt->setUInt32(2, m_borderStyle);
707  stmt->setUInt32(3, m_borderColor);
708  stmt->setUInt32(4, m_backgroundColor);
709  stmt->setUInt64(5, guildId);
711 }
void Execute(const char *sql)
Definition: DatabaseWorkerPool.h:87
uint32 m_backgroundColor
Definition: Guild.h:285
uint32 m_color
Definition: Guild.h:282
Definition: PreparedStatement.h:74
uint32 m_style
Definition: Guild.h:281
uint32 m_borderColor
Definition: Guild.h:284
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
Definition: CharacterDatabase.h:191
void setUInt32(const uint8 index, const uint32 value)
Definition: PreparedStatement.cpp:115
uint32 m_borderStyle
Definition: Guild.h:283
void setUInt64(const uint8 index, const uint64 value)
Definition: PreparedStatement.cpp:124
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool EmblemInfo::ValidateEmblemColors ( )
683 {
684  return sGuildColorBackgroundStore.LookupEntry(m_backgroundColor) &&
685  sGuildColorBorderStore.LookupEntry(m_borderColor) &&
686  sGuildColorEmblemStore.LookupEntry(m_color);
687 
688 }
uint32 m_backgroundColor
Definition: Guild.h:285
uint32 m_color
Definition: Guild.h:282
DBCStorage< GuildColorEmblemEntry > sGuildColorEmblemStore(GuildColorEmblemfmt)
uint32 m_borderColor
Definition: Guild.h:284
DBCStorage< GuildColorBorderEntry > sGuildColorBorderStore(GuildColorBorderfmt)
DBCStorage< GuildColorBackgroundEntry > sGuildColorBackgroundStore(GuildColorBackgroundfmt)

+ Here is the caller graph for this function:

Member Data Documentation

uint32 EmblemInfo::m_backgroundColor
private
uint32 EmblemInfo::m_borderColor
private
uint32 EmblemInfo::m_borderStyle
private
uint32 EmblemInfo::m_color
private
uint32 EmblemInfo::m_style
private

The documentation for this class was generated from the following files: