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

Public Member Functions

 LoginQueryHolder (uint32 accountId, ObjectGuid guid)
 
ObjectGuid GetGuid () const
 
uint32 GetAccountId () const
 
bool Initialize ()
 
- Public Member Functions inherited from SQLQueryHolder
 SQLQueryHolder ()
 
virtual ~SQLQueryHolder ()
 
bool SetQuery (size_t index, const char *sql)
 
template<typename Format , typename... Args>
bool SetPQuery (size_t index, Format &&sql, Args &&...args)
 
bool SetPreparedQuery (size_t index, PreparedStatement *stmt)
 
void SetSize (size_t size)
 
QueryResult GetResult (size_t index)
 
PreparedQueryResult GetPreparedResult (size_t index)
 
void SetResult (size_t index, ResultSet *result)
 
void SetPreparedResult (size_t index, PreparedResultSet *result)
 

Private Attributes

uint32 m_accountId
 
ObjectGuid m_guid
 

Constructor & Destructor Documentation

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

Member Function Documentation

uint32 LoginQueryHolder::GetAccountId ( ) const
inline
67 { return m_accountId; }
uint32 m_accountId
Definition: CharacterHandler.cpp:61
ObjectGuid LoginQueryHolder::GetGuid ( ) const
inline
66 { return m_guid; }
ObjectGuid m_guid
Definition: CharacterHandler.cpp:62

+ Here is the caller graph for this function:

bool LoginQueryHolder::Initialize ( )
72 {
73  SetSize(MAX_PLAYER_LOGIN_QUERY);
74 
75  bool res = true;
77 
79  stmt->setUInt64(0, lowGuid);
80  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_FROM, stmt);
81 
83  stmt->setUInt64(0, lowGuid);
84  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GROUP, stmt);
85 
87  stmt->setUInt64(0, lowGuid);
88  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES, stmt);
89 
91  stmt->setUInt64(0, lowGuid);
92  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_AURAS, stmt);
93 
95  stmt->setUInt64(0, lowGuid);
96  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_AURA_EFFECTS, stmt);
97 
99  stmt->setUInt64(0, lowGuid);
100  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SPELLS, stmt);
101 
103  stmt->setUInt64(0, lowGuid);
104  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS, stmt);
105 
107  stmt->setUInt64(0, lowGuid);
108  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_OBJECTIVES, stmt);
109 
111  stmt->setUInt64(0, lowGuid);
112  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS, stmt);
113 
115  stmt->setUInt64(0, lowGuid);
116  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS, stmt);
117 
119  stmt->setUInt64(0, lowGuid);
120  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS, stmt);
121 
123  stmt->setUInt64(0, lowGuid);
124  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS, stmt);
125 
127  stmt->setUInt64(0, lowGuid);
128  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_REPUTATION, stmt);
129 
131  stmt->setUInt64(0, lowGuid);
132  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_INVENTORY, stmt);
133 
135  stmt->setUInt64(0, lowGuid);
136  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_VOID_STORAGE, stmt);
137 
139  stmt->setUInt64(0, lowGuid);
140  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACTIONS, stmt);
141 
143  stmt->setUInt64(0, lowGuid);
144  stmt->setUInt64(1, uint64(time(NULL)));
145  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MAIL_COUNT, stmt);
146 
148  stmt->setUInt64(0, lowGuid);
149  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MAIL_DATE, stmt);
150 
152  stmt->setUInt64(0, lowGuid);
153  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST, stmt);
154 
156  stmt->setUInt64(0, lowGuid);
157  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_HOME_BIND, stmt);
158 
160  stmt->setUInt64(0, lowGuid);
161  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS, stmt);
162 
164  stmt->setUInt64(0, lowGuid);
165  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SPELL_CHARGES, stmt);
166 
167  if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED))
168  {
170  stmt->setUInt64(0, lowGuid);
171  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES, stmt);
172  }
173 
175  stmt->setUInt64(0, lowGuid);
176  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GUILD, stmt);
177 
179  stmt->setUInt64(0, lowGuid);
180  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO, stmt);
181 
183  stmt->setUInt64(0, lowGuid);
184  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS, stmt);
185 
187  stmt->setUInt64(0, lowGuid);
188  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS, stmt);
189 
191  stmt->setUInt64(0, lowGuid);
192  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS, stmt);
193 
195  stmt->setUInt64(0, lowGuid);
196  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_CUF_PROFILES, stmt);
197 
199  stmt->setUInt64(0, lowGuid);
200  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BG_DATA, stmt);
201 
203  stmt->setUInt64(0, lowGuid);
204  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GLYPHS, stmt);
205 
207  stmt->setUInt64(0, lowGuid);
208  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_TALENTS, stmt);
209 
211  stmt->setUInt64(0, lowGuid);
212  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA, stmt);
213 
215  stmt->setUInt64(0, lowGuid);
216  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SKILLS, stmt);
217 
219  stmt->setUInt64(0, lowGuid);
220  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG, stmt);
221 
223  stmt->setUInt64(0, lowGuid);
224  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BANNED, stmt);
225 
227  stmt->setUInt64(0, lowGuid);
228  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW, stmt);
229 
231  stmt->setUInt32(0, m_accountId);
232  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES, stmt);
233 
235  stmt->setUInt64(0, lowGuid);
236  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_CURRENCY, stmt);
237 
239  stmt->setUInt64(0, lowGuid);
240  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_CORPSE_LOCATION, stmt);
241 
243  stmt->setUInt64(0, lowGuid);
244  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GARRISON, stmt);
245 
247  stmt->setUInt64(0, lowGuid);
248  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GARRISON_BLUEPRINTS, stmt);
249 
251  stmt->setUInt64(0, lowGuid);
252  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GARRISON_BUILDINGS, stmt);
253 
255  stmt->setUInt64(0, lowGuid);
256  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GARRISON_FOLLOWERS, stmt);
257 
259  stmt->setUInt64(0, lowGuid);
260  res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GARRISON_FOLLOWER_ABILITIES, stmt);
261 
262  return res;
263 }
ObjectGuid m_guid
Definition: CharacterHandler.cpp:62
Definition: CharacterDatabase.h:287
Definition: CharacterDatabase.h:106
Definition: CharacterDatabase.h:104
Definition: CharacterDatabase.h:581
Definition: CharacterDatabase.h:115
Definition: CharacterDatabase.h:594
Definition: CharacterDatabase.h:118
Definition: World.h:133
Definition: CharacterDatabase.h:99
Definition: CharacterDatabase.h:110
Definition: CharacterDatabase.h:95
Definition: CharacterDatabase.h:223
Definition: CharacterDatabase.h:72
Definition: CharacterDatabase.h:591
Definition: CharacterDatabase.h:108
Definition: CharacterDatabase.h:112
Definition: CharacterDatabase.h:70
Definition: CharacterDatabase.h:94
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: CharacterDatabase.h:96
uint64_t uint64
Definition: g3dmath.h:170
Definition: CharacterDatabase.h:113
Definition: CharacterDatabase.h:80
#define sWorld
Definition: World.h:887
Definition: CharacterDatabase.h:119
Definition: CharacterDatabase.h:102
Definition: CharacterDatabase.h:503
uint64 LowType
Definition: ObjectGuid.h:199
Definition: CharacterDatabase.h:588
Definition: CharacterDatabase.h:585
Definition: PreparedStatement.h:74
Definition: CharacterDatabase.h:117
Definition: CharacterDatabase.h:116
Definition: CharacterDatabase.h:114
Definition: CharacterDatabase.h:98
uint32 m_accountId
Definition: CharacterHandler.cpp:61
Definition: CharacterDatabase.h:73
bool SetPreparedQuery(size_t index, PreparedStatement *stmt)
Definition: QueryHolder.cpp:43
Definition: CharacterDatabase.h:105
Definition: CharacterDatabase.h:111
Definition: CharacterDatabase.h:508
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
Definition: CharacterDatabase.h:75
void setUInt32(const uint8 index, const uint32 value)
Definition: PreparedStatement.cpp:115
Definition: CharacterDatabase.h:69
Definition: CharacterDatabase.h:109
Definition: CharacterDatabase.h:103
Definition: CharacterDatabase.h:78
Definition: CharacterDatabase.h:71
void SetSize(size_t size)
Definition: QueryHolder.cpp:140
Definition: CharacterDatabase.h:76
void setUInt64(const uint8 index, const uint64 value)
Definition: PreparedStatement.cpp:124
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
Definition: CharacterDatabase.h:101
Definition: CharacterDatabase.h:79
Definition: CharacterDatabase.h:231
Definition: CharacterDatabase.h:68
Definition: CharacterDatabase.h:77
LowType GetCounter() const
Definition: ObjectGuid.h:221

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

uint32 LoginQueryHolder::m_accountId
private
ObjectGuid LoginQueryHolder::m_guid
private

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