Core/Entities: unit states cleanup

Port From (https://github.com/TrinityCore/TrinityCore/commit/70c26d53cb94f0e78a57ecc2279c960370891aa4)
This commit is contained in:
hondacrx
2021-08-08 23:44:54 -04:00
parent 26a2eced6e
commit b039353f1a
5 changed files with 51 additions and 39 deletions
+2 -2
View File
@@ -2945,7 +2945,7 @@ namespace Game.Entities
}
if (!noTurnDuringCast)
AddUnitState(UnitState.CannotTurn);
AddUnitState(UnitState.Focusing);
}
public override bool IsFocusing(Spell focusSpell = null, bool withDelay = false)
@@ -3000,7 +3000,7 @@ namespace Game.Entities
MustReacquireTarget();
if (_focusSpell.GetSpellInfo().HasAttribute(SpellAttr5.DontTurnDuringCast))
ClearUnitState(UnitState.CannotTurn);
ClearUnitState(UnitState.Focusing);
_focusSpell = null;
_focusDelay = (!IsPet() && withDelay) ? GameTime.GetGameTimeMS() : 0; // don't allow re-target right away to prevent visual bugs