aboutsummaryrefslogtreecommitdiff
path: root/src/game/WorldSession.h
diff options
context:
space:
mode:
authormegamage <none@none>2009-09-01 16:47:49 -0500
committermegamage <none@none>2009-09-01 16:47:49 -0500
commitdc68c2b269fdd401e2f0f6e1e372292b74c66bb8 (patch)
tree385932d0531cec602257aa91492d14dfe7533602 /src/game/WorldSession.h
parentf0e6acda3b080f7c686190731a2a8c6f5215336b (diff)
[8433] Implement proper store and use character specific account data.
* Base at TOM_RUS reseach save/load character specific account data in new table `character_account_data` * Move its in sql update from `account_data` to new table. * For client packets that can be send in loggined state or just after logout but assocualted with recently logout character add new login status STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT * Store low guid for loggedin player or recently logout into WorldSession. Author: VladimirMangos, TOM_RUS --HG-- branch : trunk
Diffstat (limited to 'src/game/WorldSession.h')
-rw-r--r--src/game/WorldSession.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/game/WorldSession.h b/src/game/WorldSession.h
index c549a2c87ad..0da58f55445 100644
--- a/src/game/WorldSession.h
+++ b/src/game/WorldSession.h
@@ -46,7 +46,22 @@ class QueryResult;
class LoginQueryHolder;
class CharacterHandler;
-#define NUM_ACCOUNT_DATA_TYPES 8
+enum AccountDataType
+{
+ GLOBAL_CONFIG_CACHE = 0, // 0x01 g
+ PER_CHARACTER_CONFIG_CACHE = 1, // 0x02 p
+ GLOBAL_BINDINGS_CACHE = 2, // 0x04 g
+ PER_CHARACTER_BINDINGS_CACHE = 3, // 0x08 p
+ GLOBAL_MACROS_CACHE = 4, // 0x10 g
+ PER_CHARACTER_MACROS_CACHE = 5, // 0x20 p
+ PER_CHARACTER_LAYOUT_CACHE = 6, // 0x40 p
+ PER_CHARACTER_CHAT_CACHE = 7, // 0x80 p
+};
+
+#define NUM_ACCOUNT_DATA_TYPES 8
+
+#define GLOBAL_CACHE_MASK 0x15
+#define PER_CHARACTER_CACHE_MASK 0xEA
struct AccountData
{
@@ -127,7 +142,7 @@ class TRINITY_DLL_SPEC WorldSession
char const* GetPlayerName() const;
void SetSecurity(AccountTypes security) { _security = security; }
std::string const& GetRemoteAddress() { return m_Address; }
- void SetPlayer(Player *plr) { _player = plr; }
+ void SetPlayer(Player *plr);
uint8 Expansion() const { return m_expansion; }
/// Session in auth.queue currently
@@ -185,9 +200,11 @@ class TRINITY_DLL_SPEC WorldSession
void SendPetNameQuery(uint64 guid, uint32 petnumber);
// Account Data
- AccountData *GetAccountData(uint32 type) { return &m_accountData[type]; }
- void SetAccountData(uint32 type, time_t time_, std::string data);
- void LoadAccountData();
+ AccountData *GetAccountData(AccountDataType type) { return &m_accountData[type]; }
+ void SetAccountData(AccountDataType type, time_t time_, std::string data);
+ void SendAccountDataTimes();
+ void LoadGlobalAccountData();
+ void LoadAccountData(QueryResult* result, uint32 mask);
void LoadTutorialsData();
void SendTutorialsData();
void SaveTutorialsData();
@@ -727,6 +744,7 @@ class TRINITY_DLL_SPEC WorldSession
void LogUnexpectedOpcode(WorldPacket *packet, const char * reason);
void LogUnprocessedTail(WorldPacket *packet);
+ uint32 m_GUIDLow; // set loggined or recently logout player (while m_playerRecentlyLogout set)
Player *_player;
WorldSocket *m_Socket;
std::string m_Address;