Core/Creature: Fix another pet assert

Port From (https://github.com/TrinityCore/TrinityCore/commit/18d1f0c964a17cc79732eb20958b9c594ebd3628)
This commit is contained in:
hondacrx
2022-01-04 19:58:28 -05:00
parent 9f5414d894
commit 5f25f86b81
2 changed files with 6 additions and 3 deletions
+5 -1
View File
@@ -3020,7 +3020,11 @@ namespace Game.Entities
void ReacquireSpellFocusTarget()
{
Cypher.Assert(HasSpellFocus());
if (!HasSpellFocus())
{
//Log.outError(LogFilter.Unit, $"Creature::ReacquireSpellFocusTarget() being called with HasSpellFocus() returning false. {GetDebugInfo()}");
return;
}
SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.Target), _spellFocusInfo.Target);
+1 -2
View File
@@ -241,8 +241,7 @@ namespace Game
if (pet.ToPet().GetPetType() == PetType.Hunter)
GetPlayer().RemovePet(pet.ToPet(), PetSaveMode.AsDeleted);
else
//dismissing a summoned pet is like killing them (this prevents returning a soulshard...)
pet.SetDeathState(DeathState.Corpse);
GetPlayer().RemovePet(pet.ToPet(), PetSaveMode.NotInSlot);
}
else if (pet.HasUnitTypeMask(UnitTypeMask.Minion))
{