[11055] Save pet related data in one single transaction. Also merge Pet::DeleteFromDB() queries into one single transaction request.

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
Ambal 2011-01-21 00:06:58 +02:00
parent 07c9f0cbb8
commit 7ef75985b9
4 changed files with 12 additions and 7 deletions

View file

@ -4307,7 +4307,8 @@ void Player::DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRe
{
Field *fields3 = resultPets->Fetch();
uint32 petguidlow = fields3[0].GetUInt32();
Pet::DeleteFromDB(petguidlow);
//do not create separate transaction for pet delete otherwise we will get fatal error!
Pet::DeleteFromDB(petguidlow, false);
} while (resultPets->NextRow());
delete resultPets;
}