Core/Pets: Save last summoned pet number in characters table

Port From (https://github.com/TrinityCore/TrinityCore/commit/8349444749227b3fd95196c7d74d9a3dde22dd6b)
This commit is contained in:
hondacrx
2022-03-10 10:35:54 -05:00
parent 5322ae75dd
commit cd29996170
5 changed files with 18 additions and 28 deletions
+2 -3
View File
@@ -934,7 +934,7 @@ namespace Game
}
// Load pet if any (if player not alive and in taxi flight or another then pet will remember as temporary unsummoned)
pCurrChar.LoadPet();
pCurrChar.ResummonPetTemporaryUnSummonedIfAny();
// Set FFA PvP for non GM in non-rest mode
if (Global.WorldMgr.IsFFAPvPRealm() && !pCurrChar.IsGameMaster() && !pCurrChar.HasPlayerFlag(PlayerFlags.Resting))
@@ -2867,8 +2867,7 @@ namespace Game
bool result = true;
PreparedStatement stmt = DB.Characters.GetPreparedStatement(statements[isDeletedCharacters ? 1 : 0][withDeclinedNames ? 1 : 0]);
stmt.AddValue(0, (byte)PetSaveMode.AsCurrent);
stmt.AddValue(1, accountId);
stmt.AddValue(0, accountId);
SetQuery(EnumCharacterQueryLoad.Characters, stmt);
stmt = DB.Characters.GetPreparedStatement(statements[isDeletedCharacters ? 1 : 0][2]);