servuo/Scripts/Misc/ItemFlags.cs
TrueUO 1c7f53a414
OCT17 (#4887)
* OCT17

Minor gump cleanup and XML cleanup.

* Improvements

- Skill Gain is no longer redundantly checked against the same values inside of XMLSpawner.
- AI_Animal (which was not used and just defaulted to AI_Melee) along with AI_Beserk, AI_Predator, and AI_Thief have been safely removed.
- ItemFlags.cs has been moved from XMLSpawner to MISC.
- Removed some misc double calls.

* Needed for recent AI fix.

* Item Fix
2020-10-21 10:15:47 -07:00

26 lines
737 B
C#

namespace Server.Items
{
public static class ItemFlags
{
private const int StealableFlag = 0x00200000;
private const int TakenFlag = 0x00100000;
public static void SetStealable(Item target, bool value)
{
target?.SetSavedFlag(StealableFlag, value);
}
public static bool GetStealable(Item target)
{
return target != null && target.GetSavedFlag(StealableFlag);
}
public static void SetTaken(Item target, bool value)
{
target?.SetSavedFlag(TakenFlag, value);
}
public static bool GetTaken(Item target)
{
return target != null && target.GetSavedFlag(TakenFlag);
}
}
}