*Fix the bug about arena personal rating.

*Update to Mangos 6870. Source: Mangos. Main change: add a function SaveDataFieldToDB().

--HG--
branch : trunk
This commit is contained in:
megamage committed 2008-12-01 17:36:11 -06:00
1 parent 28e1aec6df
commit 920dae4f7f
7 files changed
+66 -49

No files matched your search

+16 -1
View File
@@ -15395,7 +15395,8 @@ void Player::SaveToDB()
void Player::SaveInventoryAndGoldToDB()
{
_SaveInventory();
SetUInt32ValueInDB(PLAYER_FIELD_COINAGE,GetMoney(),GetGUID());
//money is in data field
SaveDataFieldToDB();
}
void Player::_SaveActions()
@@ -15787,6 +15788,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;