mirror of
https://github.com/ServUO/ServUO
synced 2026-08-11 20:23:04 -04:00
* 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
26 lines
737 B
C#
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);
|
|
}
|
|
}
|
|
}
|