mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Merge branch 'master' into 303
This commit is contained in:
commit
518d7f6297
11 changed files with 86 additions and 97 deletions
|
|
@ -1379,7 +1379,7 @@ void Player::BuildEnumData( QueryResult * result, WorldPacket * p_data )
|
|||
*p_data << GetPositionY();
|
||||
*p_data << GetPositionZ();
|
||||
|
||||
*p_data << GetUInt32Value(PLAYER_GUILDID); // guild id
|
||||
*p_data << (result ? result->Fetch()[13].GetUInt32() : 0);
|
||||
|
||||
uint32 char_flags = 0;
|
||||
if(HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM))
|
||||
|
|
@ -1392,7 +1392,7 @@ void Player::BuildEnumData( QueryResult * result, WorldPacket * p_data )
|
|||
char_flags |= CHARACTER_FLAG_RENAME;
|
||||
// always send the flag if declined names aren't used
|
||||
// to let the client select a default method of declining the name
|
||||
if(!sWorld.getConfig(CONFIG_DECLINED_NAMES_USED) || (result && result->Fetch()[13].GetCppString() != ""))
|
||||
if(!sWorld.getConfig(CONFIG_DECLINED_NAMES_USED) || (result && result->Fetch()[14].GetCppString() != ""))
|
||||
char_flags |= CHARACTER_FLAG_DECLINED;
|
||||
|
||||
*p_data << (uint32)char_flags; // character flags
|
||||
|
|
@ -15357,7 +15357,8 @@ void Player::SaveToDB()
|
|||
void Player::SaveInventoryAndGoldToDB()
|
||||
{
|
||||
_SaveInventory();
|
||||
SetUInt32ValueInDB(PLAYER_FIELD_COINAGE,GetMoney(),GetGUID());
|
||||
//money is in data field
|
||||
SaveDataFieldToDB();
|
||||
}
|
||||
|
||||
void Player::_SaveActions()
|
||||
|
|
@ -15748,6 +15749,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