Include petsaving under transactioncontrol in Player::SaveToDB()
--HG-- branch : trunk
This commit is contained in:
+2
-2
@@ -17537,8 +17537,6 @@ void Player::SaveToDB()
|
||||
GetSession()->SaveTutorialsData(); // changed only while character in game
|
||||
_SaveGlyphs();
|
||||
|
||||
CharacterDatabase.CommitTransaction();
|
||||
|
||||
// check if stats should only be saved on logout
|
||||
// save stats can be out of transaction
|
||||
if (m_session->isLogingOut() || !sWorld.getConfig(CONFIG_STATS_SAVE_ONLY_ON_LOGOUT))
|
||||
@@ -17547,6 +17545,8 @@ void Player::SaveToDB()
|
||||
// save pet (hunter pet level and experience and all type pets health/mana).
|
||||
if (Pet* pet = GetPet())
|
||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||
|
||||
CharacterDatabase.CommitTransaction();
|
||||
}
|
||||
|
||||
// fast save function for item/money cheating preventing - save only inventory and money state
|
||||
|
||||
Reference in New Issue
Block a user