Core/Unit: Fixed Deterrence stopping working for no reason

Port From (https://github.com/TrinityCore/TrinityCore/commit/4c632bb69004bace82d8e67247c3831e6971889b)
This commit is contained in:
hondacrx
2022-05-30 12:45:30 -04:00
parent 14aa18ae65
commit e6f65fc228
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1280,7 +1280,7 @@ namespace Game.Entities
bool canDodge = !victim.IsTypeId(TypeId.Player) || canParryOrBlock;
// if victim is casting or cc'd it can't avoid attacks
if (victim.IsNonMeleeSpellCast(false) || victim.HasUnitState(UnitState.Controlled))
if (victim.IsNonMeleeSpellCast(false, false, true) || victim.HasUnitState(UnitState.Controlled))
{
canDodge = false;
canParryOrBlock = false;
+1 -1
View File
@@ -766,7 +766,7 @@ namespace Game.Entities
bool canBlock = spellInfo.HasAttribute(SpellAttr3.BlockableSpell);
// if victim is casting or cc'd it can't avoid attacks
if (victim.IsNonMeleeSpellCast(false) || victim.HasUnitState(UnitState.Controlled))
if (victim.IsNonMeleeSpellCast(false, false, true) || victim.HasUnitState(UnitState.Controlled))
{
canDodge = false;
canParry = false;