mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[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:
parent
571221148a
commit
818c378854
5 changed files with 22 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue