AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
LoginQueryHolder Class Reference
Inheritance diagram for LoginQueryHolder:
SQLQueryHolder< T > SQLQueryHolderBase

Public Member Functions

 LoginQueryHolder (uint32 accountId, ObjectGuid guid)
 
ObjectGuid GetGuid () const
 
uint32 GetAccountId () const
 
bool Initialize ()
 
- Public Member Functions inherited from SQLQueryHolder< T >
bool SetPreparedQuery (size_t index, PreparedStatement< T > *stmt)
 
- Public Member Functions inherited from SQLQueryHolderBase
 SQLQueryHolderBase ()=default
 
virtual ~SQLQueryHolderBase ()
 
void SetSize (size_t size)
 
PreparedQueryResult GetPreparedResult (size_t index) const
 
void SetPreparedResult (size_t index, PreparedResultSet *result)
 

Private Attributes

uint32 m_accountId
 
ObjectGuid m_guid
 

Additional Inherited Members

- Protected Member Functions inherited from SQLQueryHolderBase
bool SetPreparedQueryImpl (size_t index, PreparedStatementBase *stmt)
 

Detailed Description

Constructor & Destructor Documentation

◆ LoginQueryHolder()

LoginQueryHolder::LoginQueryHolder ( uint32  accountId,
ObjectGuid  guid 
)
inline
69 : m_accountId(accountId), m_guid(guid) { }
ObjectGuid m_guid
Definition: CharacterHandler.cpp:66
uint32 m_accountId
Definition: CharacterHandler.cpp:65

Member Function Documentation

◆ GetAccountId()

uint32 LoginQueryHolder::GetAccountId ( ) const
inline
72{ return m_accountId; }

References m_accountId.

◆ GetGuid()

ObjectGuid LoginQueryHolder::GetGuid ( ) const
inline
71{ return m_guid; }

References m_guid.

Referenced by WorldSession::HandlePlayerLoginFromDB().

◆ Initialize()

bool LoginQueryHolder::Initialize ( )
77{
79
80 bool res = true;
82
84 stmt->SetData(0, lowGuid);
86
87 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AURAS);
88 stmt->SetData(0, lowGuid);
90
91 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELL);
92 stmt->SetData(0, lowGuid);
94
95 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUS);
96 stmt->SetData(0, lowGuid);
98
99 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DAILYQUESTSTATUS);
100 stmt->SetData(0, lowGuid);
102
103 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS);
104 stmt->SetData(0, lowGuid);
106
107 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MONTHLYQUESTSTATUS);
108 stmt->SetData(0, lowGuid);
110
112 stmt->SetData(0, lowGuid);
114
115 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_REPUTATION);
116 stmt->SetData(0, lowGuid);
118
119 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_INVENTORY);
120 stmt->SetData(0, lowGuid);
122
123 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACTIONS);
124 stmt->SetData(0, lowGuid);
126
127 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL);
128 stmt->SetData(0, lowGuid);
129 stmt->SetData(1, uint32(GameTime::GetGameTime().count()));
131
132 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAILITEMS);
133 stmt->SetData(0, lowGuid);
135
136 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SOCIALLIST);
137 stmt->SetData(0, lowGuid);
139
140 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_HOMEBIND);
141 stmt->SetData(0, lowGuid);
143
144 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS);
145 stmt->SetData(0, lowGuid);
147
148 if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED))
149 {
150 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DECLINEDNAMES);
151 stmt->SetData(0, lowGuid);
153 }
154
155 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACHIEVEMENTS);
156 stmt->SetData(0, lowGuid);
158
159 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_CRITERIAPROGRESS);
160 stmt->SetData(0, lowGuid);
162
163 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_EQUIPMENTSETS);
164 stmt->SetData(0, lowGuid);
166
167 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ENTRY_POINT);
168 stmt->SetData(0, lowGuid);
170
171 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_GLYPHS);
172 stmt->SetData(0, lowGuid);
174
175 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_TALENTS);
176 stmt->SetData(0, lowGuid);
178
179 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PLAYER_ACCOUNT_DATA);
180 stmt->SetData(0, lowGuid);
182
183 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SKILLS);
184 stmt->SetData(0, lowGuid);
186
187 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_RANDOMBG);
188 stmt->SetData(0, lowGuid);
190
191 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_BANNED);
192 stmt->SetData(0, lowGuid);
194
195 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUSREW);
196 stmt->SetData(0, lowGuid);
198
199 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_BREW_OF_THE_MONTH);
200 stmt->SetData(0, lowGuid);
202
203 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES);
204 stmt->SetData(0, m_accountId);
206
207 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CORPSE_LOCATION);
208 stmt->SetData(0, lowGuid);
210
211 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_SETTINGS);
212 stmt->SetData(0, lowGuid);
214
215 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_PETS);
216 stmt->SetData(0, lowGuid);
218
219 return res;
220}
std::uint32_t uint32
Definition: Define.h:108
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
@ CHAR_SEL_CHARACTER_ACTIONS
Definition: CharacterDatabase.h:80
@ CHAR_SEL_CHARACTER_DAILYQUESTSTATUS
Definition: CharacterDatabase.h:70
@ CHAR_SEL_CHARACTER
Definition: CharacterDatabase.h:66
@ CHAR_SEL_CHARACTER_QUESTSTATUSREW
Definition: CharacterDatabase.h:99
@ CHAR_SEL_PLAYER_ACCOUNT_DATA
Definition: CharacterDatabase.h:201
@ CHAR_SEL_CHARACTER_AURAS
Definition: CharacterDatabase.h:67
@ CHAR_SEL_CHAR_PETS
Definition: CharacterDatabase.h:474
@ CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES
Definition: CharacterDatabase.h:100
@ CHAR_SEL_MAILITEMS
Definition: CharacterDatabase.h:101
@ CHAR_SEL_CHARACTER_SOCIALLIST
Definition: CharacterDatabase.h:86
@ CHAR_SEL_CHARACTER_HOMEBIND
Definition: CharacterDatabase.h:87
@ CHAR_SEL_CHARACTER_ENTRY_POINT
Definition: CharacterDatabase.h:93
@ CHAR_SEL_CHARACTER_INVENTORY
Definition: CharacterDatabase.h:79
@ CHAR_SEL_CHARACTER_QUESTSTATUS
Definition: CharacterDatabase.h:69
@ CHAR_SEL_CHARACTER_TALENTS
Definition: CharacterDatabase.h:95
@ CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS
Definition: CharacterDatabase.h:71
@ CHAR_SEL_MAIL
Definition: CharacterDatabase.h:351
@ CHAR_SEL_CHAR_SETTINGS
Definition: CharacterDatabase.h:514
@ CHAR_SEL_CORPSE_LOCATION
Definition: CharacterDatabase.h:248
@ CHAR_SEL_CHARACTER_CRITERIAPROGRESS
Definition: CharacterDatabase.h:91
@ CHAR_SEL_CHARACTER_GLYPHS
Definition: CharacterDatabase.h:94
@ CHAR_SEL_BREW_OF_THE_MONTH
Definition: CharacterDatabase.h:102
@ CHAR_SEL_CHARACTER_REPUTATION
Definition: CharacterDatabase.h:78
@ CHAR_SEL_CHARACTER_SPELL
Definition: CharacterDatabase.h:68
@ CHAR_SEL_CHARACTER_RANDOMBG
Definition: CharacterDatabase.h:97
@ CHAR_SEL_CHARACTER_EQUIPMENTSETS
Definition: CharacterDatabase.h:92
@ CHAR_SEL_CHARACTER_SKILLS
Definition: CharacterDatabase.h:96
@ CHAR_SEL_CHARACTER_SPELLCOOLDOWNS
Definition: CharacterDatabase.h:88
@ CHAR_SEL_CHARACTER_MONTHLYQUESTSTATUS
Definition: CharacterDatabase.h:72
@ CHAR_SEL_CHARACTER_ACHIEVEMENTS
Definition: CharacterDatabase.h:90
@ CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS
Definition: CharacterDatabase.h:73
@ CHAR_SEL_CHARACTER_DECLINEDNAMES
Definition: CharacterDatabase.h:89
@ CHAR_SEL_CHARACTER_BANNED
Definition: CharacterDatabase.h:98
@ PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS
Definition: Player.h:869
@ PLAYER_LOGIN_QUERY_LOAD_GLYPHS
Definition: Player.h:875
@ PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES
Definition: Player.h:870
@ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW
Definition: Player.h:882
@ MAX_PLAYER_LOGIN_QUERY
Definition: Player.h:890
@ PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS
Definition: Player.h:861
@ PLAYER_LOGIN_QUERY_LOAD_CHARACTER_SETTINGS
Definition: Player.h:888
@ PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES
Definition: Player.h:883
@ PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS
Definition: Player.h:884
@ PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST
Definition: Player.h:867
@ PLAYER_LOGIN_QUERY_LOAD_ACTIONS
Definition: Player.h:864
@ PLAYER_LOGIN_QUERY_LOAD_SKILLS
Definition: Player.h:878
@ PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA
Definition: Player.h:877
@ PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS
Definition: Player.h:866
@ PLAYER_LOGIN_QUERY_LOAD_PET_SLOTS
Definition: Player.h:889
@ PLAYER_LOGIN_QUERY_LOAD_INVENTORY
Definition: Player.h:863
@ PLAYER_LOGIN_QUERY_LOAD_REPUTATION
Definition: Player.h:862
@ PLAYER_LOGIN_QUERY_LOAD_BREW_OF_THE_MONTH
Definition: Player.h:886
@ PLAYER_LOGIN_QUERY_LOAD_FROM
Definition: Player.h:857
@ PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS
Definition: Player.h:860
@ PLAYER_LOGIN_QUERY_LOAD_ENTRY_POINT
Definition: Player.h:874
@ PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS
Definition: Player.h:879
@ PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS
Definition: Player.h:885
@ PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS
Definition: Player.h:873
@ PLAYER_LOGIN_QUERY_LOAD_MAILS
Definition: Player.h:865
@ PLAYER_LOGIN_QUERY_LOAD_AURAS
Definition: Player.h:858
@ PLAYER_LOGIN_QUERY_LOAD_TALENTS
Definition: Player.h:876
@ PLAYER_LOGIN_QUERY_LOAD_BANNED
Definition: Player.h:881
@ PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS
Definition: Player.h:872
@ PLAYER_LOGIN_QUERY_LOAD_HOME_BIND
Definition: Player.h:868
@ PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION
Definition: Player.h:887
@ PLAYER_LOGIN_QUERY_LOAD_SPELLS
Definition: Player.h:859
@ PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG
Definition: Player.h:880
@ PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS
Definition: Player.h:871
@ CONFIG_DECLINED_NAMES_USED
Definition: IWorld.h:124
#define sWorld
Definition: World.h:458
Seconds GetGameTime()
Definition: GameTime.cpp:38
Definition: PreparedStatement.h:158
bool SetPreparedQuery(size_t index, PreparedStatement< T > *stmt)
Definition: QueryHolder.h:46
Acore::Types::is_default< T > SetData(const uint8 index, T value)
Definition: PreparedStatement.h:78
void SetSize(size_t size)
Definition: QueryHolder.cpp:69
LowType GetCounter() const
Definition: ObjectGuid.h:147
uint32 LowType
Definition: ObjectGuid.h:124

References CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES, CHAR_SEL_BREW_OF_THE_MONTH, CHAR_SEL_CHAR_PETS, CHAR_SEL_CHAR_SETTINGS, CHAR_SEL_CHARACTER, CHAR_SEL_CHARACTER_ACHIEVEMENTS, CHAR_SEL_CHARACTER_ACTIONS, CHAR_SEL_CHARACTER_AURAS, CHAR_SEL_CHARACTER_BANNED, CHAR_SEL_CHARACTER_CRITERIAPROGRESS, CHAR_SEL_CHARACTER_DAILYQUESTSTATUS, CHAR_SEL_CHARACTER_DECLINEDNAMES, CHAR_SEL_CHARACTER_ENTRY_POINT, CHAR_SEL_CHARACTER_EQUIPMENTSETS, CHAR_SEL_CHARACTER_GLYPHS, CHAR_SEL_CHARACTER_HOMEBIND, CHAR_SEL_CHARACTER_INVENTORY, CHAR_SEL_CHARACTER_MONTHLYQUESTSTATUS, CHAR_SEL_CHARACTER_QUESTSTATUS, CHAR_SEL_CHARACTER_QUESTSTATUSREW, CHAR_SEL_CHARACTER_RANDOMBG, CHAR_SEL_CHARACTER_REPUTATION, CHAR_SEL_CHARACTER_SEASONALQUESTSTATUS, CHAR_SEL_CHARACTER_SKILLS, CHAR_SEL_CHARACTER_SOCIALLIST, CHAR_SEL_CHARACTER_SPELL, CHAR_SEL_CHARACTER_SPELLCOOLDOWNS, CHAR_SEL_CHARACTER_TALENTS, CHAR_SEL_CHARACTER_WEEKLYQUESTSTATUS, CHAR_SEL_CORPSE_LOCATION, CHAR_SEL_MAIL, CHAR_SEL_MAILITEMS, CHAR_SEL_PLAYER_ACCOUNT_DATA, CharacterDatabase, CONFIG_DECLINED_NAMES_USED, ObjectGuid::GetCounter(), GameTime::GetGameTime(), m_accountId, m_guid, MAX_PLAYER_LOGIN_QUERY, PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA, PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS, PLAYER_LOGIN_QUERY_LOAD_ACTIONS, PLAYER_LOGIN_QUERY_LOAD_AURAS, PLAYER_LOGIN_QUERY_LOAD_BANNED, PLAYER_LOGIN_QUERY_LOAD_BREW_OF_THE_MONTH, PLAYER_LOGIN_QUERY_LOAD_CHARACTER_SETTINGS, PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION, PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS, PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS, PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES, PLAYER_LOGIN_QUERY_LOAD_ENTRY_POINT, PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS, PLAYER_LOGIN_QUERY_LOAD_FROM, PLAYER_LOGIN_QUERY_LOAD_GLYPHS, PLAYER_LOGIN_QUERY_LOAD_HOME_BIND, PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES, PLAYER_LOGIN_QUERY_LOAD_INVENTORY, PLAYER_LOGIN_QUERY_LOAD_MAIL_ITEMS, PLAYER_LOGIN_QUERY_LOAD_MAILS, PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS, PLAYER_LOGIN_QUERY_LOAD_PET_SLOTS, PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS, PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW, PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG, PLAYER_LOGIN_QUERY_LOAD_REPUTATION, PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS, PLAYER_LOGIN_QUERY_LOAD_SKILLS, PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST, PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS, PLAYER_LOGIN_QUERY_LOAD_SPELLS, PLAYER_LOGIN_QUERY_LOAD_TALENTS, PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS, PreparedStatementBase::SetData(), SQLQueryHolder< T >::SetPreparedQuery(), SQLQueryHolderBase::SetSize(), and sWorld.

Member Data Documentation

◆ m_accountId

uint32 LoginQueryHolder::m_accountId
private

Referenced by GetAccountId(), and Initialize().

◆ m_guid

ObjectGuid LoginQueryHolder::m_guid
private

Referenced by GetGuid(), and Initialize().