Core/Creature: Fix another pet assert
Port From (https://github.com/TrinityCore/TrinityCore/commit/18d1f0c964a17cc79732eb20958b9c594ebd3628)
This commit is contained in:
@@ -3020,7 +3020,11 @@ namespace Game.Entities
|
|||||||
|
|
||||||
void ReacquireSpellFocusTarget()
|
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);
|
SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.Target), _spellFocusInfo.Target);
|
||||||
|
|
||||||
|
|||||||
@@ -241,8 +241,7 @@ namespace Game
|
|||||||
if (pet.ToPet().GetPetType() == PetType.Hunter)
|
if (pet.ToPet().GetPetType() == PetType.Hunter)
|
||||||
GetPlayer().RemovePet(pet.ToPet(), PetSaveMode.AsDeleted);
|
GetPlayer().RemovePet(pet.ToPet(), PetSaveMode.AsDeleted);
|
||||||
else
|
else
|
||||||
//dismissing a summoned pet is like killing them (this prevents returning a soulshard...)
|
GetPlayer().RemovePet(pet.ToPet(), PetSaveMode.NotInSlot);
|
||||||
pet.SetDeathState(DeathState.Corpse);
|
|
||||||
}
|
}
|
||||||
else if (pet.HasUnitTypeMask(UnitTypeMask.Minion))
|
else if (pet.HasUnitTypeMask(UnitTypeMask.Minion))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user