[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.

Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
hunuza 2009-06-22 19:10:20 +02:00
parent f34ce077c0
commit 8a32a19bad
13 changed files with 229 additions and 171 deletions

View file

@ -352,17 +352,14 @@ bool Guild::FillPlayerData(uint64 guid, MemberSlot* memslot)
}
else
{
QueryResult *result = CharacterDatabase.PQuery("SELECT name,data,zone,class FROM characters WHERE guid = '%u'", GUID_LOPART(guid));
QueryResult *result = CharacterDatabase.PQuery("SELECT name,level,zone,class FROM characters WHERE guid = '%u'", GUID_LOPART(guid));
if(!result)
return false; // player doesn't exist
Field *fields = result->Fetch();
plName = fields[0].GetCppString();
Tokens data = StrSplit(fields[1].GetCppString(), " ");
plLevel = Player::GetUInt32ValueFromArray(data,UNIT_FIELD_LEVEL);
plLevel = fields[1].GetUInt32();
plZone = fields[2].GetUInt32();
plClass = fields[3].GetUInt32();
delete result;