Entities/Creature: Fix an edge case assertion failure with pets dying in specific situations while casting spells.
Port From (https://github.com/TrinityCore/TrinityCore/commit/97bf9278a8d347badc85d7bcefdba0c1afb275e3)
This commit is contained in:
@@ -2981,7 +2981,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
public override bool HasSpellFocus(Spell focusSpell = null)
|
public override bool HasSpellFocus(Spell focusSpell = null)
|
||||||
{
|
{
|
||||||
if (!IsAlive()) // dead creatures cannot focus
|
if (IsDead()) // dead creatures cannot focus
|
||||||
{
|
{
|
||||||
if (_spellFocusInfo.Spell != null || _spellFocusInfo.Delay != 0)
|
if (_spellFocusInfo.Spell != null || _spellFocusInfo.Delay != 0)
|
||||||
Log.outWarn(LogFilter.Unit, $"Creature '{GetName()}' (entry {GetEntry()}) has spell focus (spell id {(_spellFocusInfo.Spell != null ? _spellFocusInfo.Spell.GetSpellInfo().Id : 0)}, delay {_spellFocusInfo.Delay}ms) despite being dead.");
|
Log.outWarn(LogFilter.Unit, $"Creature '{GetName()}' (entry {GetEntry()}) has spell focus (spell id {(_spellFocusInfo.Spell != null ? _spellFocusInfo.Spell.GetSpellInfo().Id : 0)}, delay {_spellFocusInfo.Delay}ms) despite being dead.");
|
||||||
|
|||||||
Reference in New Issue
Block a user