/// <summary> /// Rearms the weapon of the given type (WeaponMainHand, WeaponRanged or WeaponOffHand) /// </summary> public void UnsetDisarmed(InventorySlotType type) { var m = type.ToMask(); if (!m_DisarmMask.HasAnyFlag(m)) { return; } m_DisarmMask &= ~m; SetWeapon(type, GetOrInvalidateItem(type)); }
/// <summary> /// Disarms the weapon of the given type (WeaponMainHand, WeaponRanged or WeaponOffHand) /// </summary> public void SetDisarmed(InventorySlotType type) { var m = type.ToMask(); if (m_DisarmMask.HasAnyFlag(m)) { return; } m_DisarmMask |= m; SetWeapon(type, null); }
/// <summary> /// Rearms the weapon of the given type (WeaponMainHand, WeaponRanged or WeaponOffHand) /// </summary> public void UnsetDisarmed(InventorySlotType type) { var m = type.ToMask(); if (!m_DisarmMask.HasAnyFlag(m)) { return; } m_DisarmMask &= ~m; SetWeapon(type, GetOrInvalidateItem(type)); }
/// <summary> /// Disarms the weapon of the given type (WeaponMainHand, WeaponRanged or WeaponOffHand) /// </summary> public void SetDisarmed(InventorySlotType type) { var m = type.ToMask(); if (m_DisarmMask.HasAnyFlag(m)) { return; } m_DisarmMask |= m; SetWeapon(type, null); }
public static bool HasAnyFlag(this InventorySlotTypeMask flags, InventorySlotType type) { return (flags & type.ToMask()) != 0; }
public static bool HasAnyFlag(this InventorySlotTypeMask flags, InventorySlotType type) { return((flags & type.ToMask()) != InventorySlotTypeMask.None); }