Core/BattlePets: Delete declined names of non-account battle pets when deleting character permanently

Port From (https://github.com/TrinityCore/TrinityCore/commit/fa3cba3a00bbb6286499818f6a1f8675579a9d78)
This commit is contained in:
hondacrx
2022-05-04 10:43:57 -04:00
parent ecf40cda7e
commit a43d074c9f
2 changed files with 8 additions and 1 deletions
+6 -1
View File
@@ -4236,9 +4236,14 @@ namespace Game.Entities
stmt.AddValue(0, guid);
trans.Append(stmt);
stmt = DB.Login.GetPreparedStatement(LoginStatements.DEL_BATTLE_PET_DECLINED_NAME_BY_OWNER);
stmt.AddValue(0, guid);
stmt.AddValue(1, Global.WorldMgr.GetRealmId().Index);
loginTransaction.Append(stmt);
stmt = DB.Login.GetPreparedStatement(LoginStatements.DEL_BATTLE_PETS_BY_OWNER);
stmt.AddValue(0, guid);
stmt.AddValue(0, Global.WorldMgr.GetRealmId().Index);
stmt.AddValue(1, Global.WorldMgr.GetRealmId().Index);
loginTransaction.Append(stmt);
Corpse.DeleteFromDB(playerGuid, trans);