Core/Unit: Added helper functions to modify UNIT_FLAG2_CANNOT_TURN
Port From (https://github.com/TrinityCore/TrinityCore/commit/53f9abec14613c0823b1ee5363b3f873cc23ece9)
This commit is contained in:
@@ -684,7 +684,17 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
bool IsThreatened()
|
||||
public bool CannotTurn() { return HasUnitFlag2(UnitFlags2.CannotTurn); }
|
||||
|
||||
public void SetCannotTurn(bool apply)
|
||||
{
|
||||
if (apply)
|
||||
SetUnitFlag2(UnitFlags2.CannotTurn);
|
||||
else
|
||||
RemoveUnitFlag2(UnitFlags2.CannotTurn);
|
||||
}
|
||||
|
||||
public bool IsThreatened()
|
||||
{
|
||||
return !m_threatManager.IsThreatListEmpty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user