Core/Units: Named unit flags
Port From (https://github.com/TrinityCore/TrinityCore/commit/b4952db4640ee3ec6a7df8545b5c582202f36405)
This commit is contained in:
@@ -2994,7 +2994,7 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
if (!HasUnitFlag2(UnitFlags2.DisableTurn))
|
||||
if (!HasUnitFlag2(UnitFlags2.CannotTurn))
|
||||
{
|
||||
// Face the target - we need to do this before the unit state is modified for no-turn spells
|
||||
if (target)
|
||||
@@ -3041,7 +3041,7 @@ namespace Game.Entities
|
||||
|
||||
if (IsPet()) // player pets do not use delay system
|
||||
{
|
||||
if (!HasUnitFlag2(UnitFlags2.DisableTurn))
|
||||
if (!HasUnitFlag2(UnitFlags2.CannotTurn))
|
||||
ReacquireSpellFocusTarget();
|
||||
}
|
||||
else // don't allow re-target right away to prevent visual bugs
|
||||
@@ -3060,7 +3060,7 @@ namespace Game.Entities
|
||||
|
||||
SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.Target), _spellFocusInfo.Target);
|
||||
|
||||
if (!HasUnitFlag2(UnitFlags2.DisableTurn))
|
||||
if (!HasUnitFlag2(UnitFlags2.CannotTurn))
|
||||
{
|
||||
if (!_spellFocusInfo.Target.IsEmpty())
|
||||
{
|
||||
|
||||
@@ -499,7 +499,7 @@ namespace Game.Entities
|
||||
if (attType != WeaponAttackType.BaseAttack && attType != WeaponAttackType.OffAttack)
|
||||
return;
|
||||
|
||||
if (IsTypeId(TypeId.Unit) && !HasUnitFlag(UnitFlags.Possessed) && !HasUnitFlag2(UnitFlags2.DisableTurn))
|
||||
if (IsTypeId(TypeId.Unit) && !HasUnitFlag(UnitFlags.Possessed) && !HasUnitFlag2(UnitFlags2.CannotTurn))
|
||||
SetFacingToObject(victim, false); // update client side facing to face the target (prevents visual glitches when casting untargeted spells)
|
||||
|
||||
// melee attack spell casted at main hand attack only - no normal melee dmg dealt
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Game.Entities
|
||||
public virtual bool CanSwim()
|
||||
{
|
||||
// Mirror client behavior, if this method returns false then client will not use swimming animation and for players will apply gravity as if there was no water
|
||||
if (HasUnitFlag(UnitFlags.CannotSwim))
|
||||
if (HasUnitFlag(UnitFlags.CantSwim))
|
||||
return false;
|
||||
if (HasUnitFlag(UnitFlags.PlayerControlled)) // is player
|
||||
return true;
|
||||
@@ -61,7 +61,7 @@ namespace Game.Entities
|
||||
if (IsPet() && HasUnitFlag(UnitFlags.PetInCombat))
|
||||
return true;
|
||||
|
||||
return HasUnitFlag(UnitFlags.Rename | UnitFlags.Swimming);
|
||||
return HasUnitFlag(UnitFlags.Rename | UnitFlags.CanSwim);
|
||||
}
|
||||
public bool IsInWater()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user