[6868] Don't load data field from DB to save money or arena team id.

Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
hunuza 2008-11-30 18:30:00 +01:00
parent 571221148a
commit 818c378854
5 changed files with 22 additions and 7 deletions

View file

@ -14993,7 +14993,8 @@ void Player::SaveToDB()
void Player::SaveInventoryAndGoldToDB()
{
_SaveInventory();
SetUInt32ValueInDB(PLAYER_FIELD_COINAGE,GetMoney(),GetGUID());
//money is in data field
SaveDataFieldToDB();
}
void Player::_SaveActions()
@ -15384,6 +15385,20 @@ void Player::SavePositionInDB(uint32 mapid, float x,float y,float z,float o,uint
CharacterDatabase.Execute(ss.str().c_str());
}
void Player::SaveDataFieldToDB()
{
std::ostringstream ss;
ss<<"UPDATE characters SET data='";
for(uint16 i = 0; i < m_valuesCount; i++ )
{
ss << GetUInt32Value(i) << " ";
}
ss<<"' WHERE guid='"<< GUID_LOPART(GetGUIDLow()) <<"'";
CharacterDatabase.Execute(ss.str().c_str());
}
bool Player::SaveValuesArrayInDB(Tokens const& tokens, uint64 guid)
{
std::ostringstream ss2;