[8072] First step to get rid of data blob.

Adds new fields gender, level, xp, money, playerBytes, playerBytes2 and playerFlags to characters table.

    The update will not work if your database contains characters with an old data field (not fitting to the actual client version).

    It's recommended to backup your character database before applying this patch.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-27 17:39:51 -05:00
parent 02a5c2fcc6
commit d9ec2d2196
16 changed files with 237 additions and 185 deletions
+3 -3
View File
@@ -873,7 +873,7 @@ class TRINITY_DLL_SPEC Player : public Unit
void Update( uint32 time );
void BuildEnumData( QueryResult * result, WorldPacket * p_data );
static bool BuildEnumData( QueryResult * result, WorldPacket * p_data );
void SetInWater(bool apply);
@@ -1234,6 +1234,7 @@ class TRINITY_DLL_SPEC Player : public Unit
static uint32 GetUInt32ValueFromDB(uint16 index, uint64 guid);
static float GetFloatValueFromDB(uint16 index, uint64 guid);
static uint32 GetZoneIdFromDB(uint64 guid);
static uint32 GetLevelFromDB(uint64 guid);
static bool LoadPositionFromDB(uint32& mapid, float& x,float& y,float& z,float& o, bool& in_flight, uint64 guid);
/*********************************************************/
@@ -1242,6 +1243,7 @@ class TRINITY_DLL_SPEC Player : public Unit
void SaveToDB();
void SaveInventoryAndGoldToDB(); // fast save function for item/money cheating preventing
void SaveGoldToDB();
void SaveDataFieldToDB();
static bool SaveValuesArrayInDB(Tokens const& data,uint64 guid);
static void SetUInt32ValueInArray(Tokens& data,uint16 index, uint32 value);
@@ -2179,8 +2181,6 @@ class TRINITY_DLL_SPEC Player : public Unit
void outDebugValues() const;
uint64 m_lootGuid;
uint32 m_race;
uint32 m_class;
uint32 m_team;
uint32 m_nextSave;
time_t m_speakTime;