diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index df2ac9753..fd86e9d57 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -2780,7 +2780,7 @@ namespace Game.Entities AddUnitState(UnitState.CannotTurn); } - public bool IsFocusing(Spell focusSpell = null, bool withDelay = false) + public override bool IsFocusing(Spell focusSpell = null, bool withDelay = false) { if (!IsAlive()) // dead creatures cannot focus { diff --git a/Source/Game/Entities/Unit/Unit.Spells.cs b/Source/Game/Entities/Unit/Unit.Spells.cs index 7fb1cee44..b7302964f 100644 --- a/Source/Game/Entities/Unit/Unit.Spells.cs +++ b/Source/Game/Entities/Unit/Unit.Spells.cs @@ -30,7 +30,10 @@ namespace Game.Entities { public virtual bool HasSpell(uint spellId) { return false; } - + public virtual bool IsFocusing(Spell focusSpell = null, bool withDelay = false) + { + return false; + } // function uses real base points (typically value - 1) public int CalculateSpellDamage(Unit target, SpellInfo spellProto, uint effect_index, int? basePoints = null, uint castItemId = 0, int itemLevel = -1) @@ -1395,6 +1398,9 @@ namespace Game.Entities if (spell.GetSpellInfo().IsMoveAllowedChannel()) return false; + if (IsFocusing(null, true)) + return false; + // prohibit movement for all other spell casts return true; }