-
-
Save pushedx/166d03e9d7aee71ecb6c9a3dcecbab93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Metadata Processing | |
private bool? _isMysteryLeaguestoneType; | |
private bool? _isLeaguestoneType; | |
private bool? _isBreachUpgrade; | |
private bool? _isBreachShard; | |
private bool? _isProphecyType; | |
private bool? _isEssenceType; | |
private bool? _isJewelType; | |
private bool? _isCardType; | |
private bool? _isTalismanType; | |
private bool? _isMapType; | |
private bool? _isMapFragmentType; | |
private bool? _isCurrencyType; | |
private bool? _isBeltType; | |
private bool? _isAmuletType; | |
private bool? _isRingType; | |
private bool? _isArmorType; | |
private bool? _isQuiverType; | |
private bool? _isFlaskType; | |
private bool? _isWeaponType; | |
private bool? _isOneHandWeaponType; | |
private bool? _isTwoHandWeaponType; | |
private bool? _isFishingRodType; | |
private bool? _isBowType; | |
private bool? _isTwoHandMaceType; | |
private bool? _isTwoHandSwordType; | |
private bool? _isTwoHandAxeType; | |
private bool? _isStaffType; | |
private bool? _isOneHandMaceType; | |
private bool? _isOneHandThrustingSwordType; | |
private bool? _isOneHandSwordType; | |
private bool? _isOneHandAxeType; | |
private bool? _isClawType; | |
private bool? _isDaggerType; | |
private bool? _isWandType; | |
private bool? _isShieldType; | |
private bool? _isHelmetType; | |
private bool? _isBodyArmorType; | |
private bool? _isBootType; | |
private bool? _isGloveType; | |
private bool? _isQuestType; | |
private bool? _isSkillGemType; | |
private bool? _isLabyrinthType; | |
/// <summary> | |
/// Returns true if this item is of the Labyrinth item type and false if not. | |
/// </summary> | |
public bool IsLabyrinthType | |
{ | |
get | |
{ | |
if (_isLabyrinthType == null) | |
{ | |
_isLabyrinthType = Metadata.Contains("/Labyrinth/"); | |
} | |
return _isLabyrinthType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the skill gem type and false if not. | |
/// </summary> | |
public bool IsSkillGemType | |
{ | |
get | |
{ | |
if (_isSkillGemType == null) | |
{ | |
_isSkillGemType = Metadata.Contains("/Gems/"); | |
} | |
return _isSkillGemType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the quest type and false if not. | |
/// </summary> | |
public bool IsQuestType | |
{ | |
get | |
{ | |
if (_isQuestType == null) | |
{ | |
_isQuestType = Metadata.Contains("/QuestItems/"); | |
} | |
return _isQuestType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the jewel type and false if not. | |
/// </summary> | |
public bool IsJewelType | |
{ | |
get | |
{ | |
if (_isJewelType == null) | |
{ | |
_isJewelType = Metadata.Contains("/Jewels/"); | |
} | |
return _isJewelType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the talisman type and false if not. | |
/// </summary> | |
public bool IsTalismanType | |
{ | |
get | |
{ | |
if (_isTalismanType == null) | |
{ | |
_isTalismanType = Metadata.Contains("/Talismans/"); | |
} | |
return _isTalismanType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the divination card type and false if not. | |
/// </summary> | |
public bool IsDivinationCardType | |
{ | |
get | |
{ | |
if (_isCardType == null) | |
{ | |
_isCardType = Metadata.Contains("/DivinationCards/"); | |
} | |
return _isCardType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the map type and false if not. | |
/// </summary> | |
public bool IsMapType | |
{ | |
get | |
{ | |
if (_isMapType == null) | |
{ | |
_isMapType = Metadata.Contains("/Maps/"); | |
} | |
return _isMapType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the map fragment type and false if not. | |
/// </summary> | |
public bool IsMapFragmentType | |
{ | |
get | |
{ | |
if (_isMapFragmentType == null) | |
{ | |
_isMapFragmentType = Metadata.Contains("/MapFragments/"); | |
} | |
return _isMapFragmentType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the currency type and false if not. | |
/// </summary> | |
public bool IsCurrencyType | |
{ | |
get | |
{ | |
if (_isCurrencyType == null) | |
{ | |
_isCurrencyType = Metadata.Contains("/Currency/") && !Metadata.Contains("CurrencyItemisedProphecy"); | |
} | |
return _isCurrencyType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the belt type and false if not. | |
/// </summary> | |
public bool IsBeltType | |
{ | |
get | |
{ | |
if (_isBeltType == null) | |
{ | |
_isBeltType = Metadata.Contains("/Belts/"); | |
} | |
return _isBeltType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the amulet type and false if not. | |
/// </summary> | |
public bool IsAmuletType | |
{ | |
get | |
{ | |
if (_isAmuletType == null) | |
{ | |
_isAmuletType = Metadata.Contains("/Amulets/"); | |
} | |
return _isAmuletType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the ring type and false if not. | |
/// </summary> | |
public bool IsRingType | |
{ | |
get | |
{ | |
if (_isRingType == null) | |
{ | |
_isRingType = Metadata.Contains("/Rings/"); | |
} | |
return _isRingType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the armour type and false if not. | |
/// </summary> | |
public bool IsArmorType | |
{ | |
get | |
{ | |
if (_isArmorType == null) | |
{ | |
_isArmorType = Metadata.Contains("/Armours/"); | |
} | |
return _isArmorType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the quiver type and false if not. | |
/// </summary> | |
public bool IsQuiverType | |
{ | |
get | |
{ | |
if (_isQuiverType == null) | |
{ | |
_isQuiverType = Metadata.Contains("/Quivers/"); | |
} | |
return _isQuiverType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the flask type and false if not. | |
/// </summary> | |
public bool IsFlaskType | |
{ | |
get | |
{ | |
if (_isFlaskType == null) | |
{ | |
_isFlaskType = Metadata.Contains("/Flasks/"); | |
} | |
return _isFlaskType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the weapon type and false if not. | |
/// </summary> | |
public bool IsWeaponType | |
{ | |
get | |
{ | |
if (_isWeaponType == null) | |
{ | |
_isWeaponType = Metadata.Contains("/Weapons/"); | |
} | |
return _isWeaponType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the one hand weapon type and false if not. | |
/// </summary> | |
public bool IsOneHandWeaponType | |
{ | |
get | |
{ | |
if (_isOneHandWeaponType == null) | |
{ | |
_isOneHandWeaponType = Metadata.Contains("/OneHandWeapons/"); | |
} | |
return _isOneHandWeaponType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the two hand weapon type and false if not. | |
/// </summary> | |
public bool IsTwoHandWeaponType | |
{ | |
get | |
{ | |
if (_isTwoHandWeaponType == null) | |
{ | |
_isTwoHandWeaponType = Metadata.Contains("/TwoHandWeapons/"); | |
} | |
return _isTwoHandWeaponType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the fishing rod type and false if not. | |
/// </summary> | |
public bool IsFishingRodType | |
{ | |
get | |
{ | |
if (_isFishingRodType == null) | |
{ | |
_isFishingRodType = Metadata.Contains("/FishingRods/"); | |
} | |
return _isFishingRodType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the bow type and false if not. | |
/// </summary> | |
public bool IsBowType | |
{ | |
get | |
{ | |
if (_isBowType == null) | |
{ | |
_isBowType = Metadata.Contains("/Bows/"); | |
} | |
return _isBowType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the tow hand mace type and false if not. | |
/// </summary> | |
public bool IsTwoHandMaceType | |
{ | |
get | |
{ | |
if (_isTwoHandMaceType == null) | |
{ | |
_isTwoHandMaceType = Metadata.Contains("/TwoHandMaces/"); | |
} | |
return _isTwoHandMaceType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the two hand sword type and false if not. | |
/// </summary> | |
public bool IsTwoHandSwordType | |
{ | |
get | |
{ | |
if (_isTwoHandSwordType == null) | |
{ | |
_isTwoHandSwordType = Metadata.Contains("/TwoHandSwords/"); | |
} | |
return _isTwoHandSwordType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the two hand axe type and false if not. | |
/// </summary> | |
public bool IsTwoHandAxeType | |
{ | |
get | |
{ | |
if (_isTwoHandAxeType == null) | |
{ | |
_isTwoHandAxeType = Metadata.Contains("/TwoHandAxes/"); | |
} | |
return _isTwoHandAxeType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the staff type and false if not. | |
/// </summary> | |
public bool IsStaffType | |
{ | |
get | |
{ | |
if (_isStaffType == null) | |
{ | |
_isStaffType = Metadata.Contains("/Staves/"); | |
} | |
return _isStaffType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the one hand mace type and false if not. | |
/// </summary> | |
public bool IsOneHandMaceType | |
{ | |
get | |
{ | |
if (_isOneHandMaceType == null) | |
{ | |
_isOneHandMaceType = Metadata.Contains("/OneHandMaces/"); | |
} | |
return _isOneHandMaceType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the one hand thrusting sword type and false if not. | |
/// </summary> | |
public bool IsOneHandThrustingSwordType | |
{ | |
get | |
{ | |
if (_isOneHandThrustingSwordType == null) | |
{ | |
_isOneHandThrustingSwordType = Metadata.Contains("/OneHandThrustingSwords/"); | |
} | |
return _isOneHandThrustingSwordType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the one hand sword type and false if not. | |
/// </summary> | |
public bool IsOneHandSwordType | |
{ | |
get | |
{ | |
if (_isOneHandSwordType == null) | |
{ | |
_isOneHandSwordType = Metadata.Contains("/OneHandSwords/"); | |
} | |
return _isOneHandSwordType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the one hand axe type and false if not. | |
/// </summary> | |
public bool IsOneHandAxeType | |
{ | |
get | |
{ | |
if (_isOneHandAxeType == null) | |
{ | |
_isOneHandAxeType = Metadata.Contains("/OneHandAxes/"); | |
} | |
return _isOneHandAxeType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the claw type and false if not. | |
/// </summary> | |
public bool IsClawType | |
{ | |
get | |
{ | |
if (_isClawType == null) | |
{ | |
_isClawType = Metadata.Contains("/Claws/"); | |
} | |
return _isClawType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the dagger type and false if not. | |
/// </summary> | |
public bool IsDaggerType | |
{ | |
get | |
{ | |
if (_isDaggerType == null) | |
{ | |
_isDaggerType = Metadata.Contains("/Daggers/"); | |
} | |
return _isDaggerType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the wand type and false if not. | |
/// </summary> | |
public bool IsWandType | |
{ | |
get | |
{ | |
if (_isWandType == null) | |
{ | |
_isWandType = Metadata.Contains("/Wands/"); | |
} | |
return _isWandType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the shield type and false if not. | |
/// </summary> | |
public bool IsShieldType | |
{ | |
get | |
{ | |
if (_isShieldType == null) | |
{ | |
_isShieldType = Metadata.Contains("/Shields/"); | |
} | |
return _isShieldType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the boot type and false if not. | |
/// </summary> | |
public bool IsBootType | |
{ | |
get | |
{ | |
if (_isBootType == null) | |
{ | |
_isBootType = Metadata.Contains("/Boots/"); | |
} | |
return _isBootType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the glove type and false if not. | |
/// </summary> | |
public bool IsGloveType | |
{ | |
get | |
{ | |
if (_isGloveType == null) | |
{ | |
_isGloveType = Metadata.Contains("/Gloves/"); | |
} | |
return _isGloveType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the body armour type and false if not. | |
/// </summary> | |
public bool IsBodyArmorType | |
{ | |
get | |
{ | |
if (_isBodyArmorType == null) | |
{ | |
_isBodyArmorType = Metadata.Contains("/BodyArmours/"); | |
} | |
return _isBodyArmorType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the helmet type and false if not. | |
/// </summary> | |
public bool IsHelmetType | |
{ | |
get | |
{ | |
if (_isHelmetType == null) | |
{ | |
_isHelmetType = Metadata.Contains("/Helmets/"); | |
} | |
return _isHelmetType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the essence type and false if not. | |
/// </summary> | |
public bool IsProphecyType | |
{ | |
get | |
{ | |
if (_isProphecyType == null) | |
{ | |
_isProphecyType = Metadata.Contains("Metadata/Items/Currency/CurrencyItemisedProphecy"); | |
} | |
return _isProphecyType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the MysteryLeaguestone type. | |
/// </summary> | |
public bool IsMysteryLeaguestone | |
{ | |
get | |
{ | |
if (_isMysteryLeaguestoneType == null) | |
{ | |
_isMysteryLeaguestoneType = Metadata.Equals("Metadata/Items/Classic/MysteryLeaguestone"); | |
} | |
return _isMysteryLeaguestoneType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the Leaguestones type and false if not. | |
/// </summary> | |
public bool IsLeaguestoneType | |
{ | |
get | |
{ | |
if (_isLeaguestoneType == null) | |
{ | |
_isLeaguestoneType = Metadata.Contains("Metadata/Items/Leaguestones/"); | |
} | |
return _isLeaguestoneType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the essence type and false if not. | |
/// </summary> | |
public bool IsEssenceType | |
{ | |
get | |
{ | |
if (_isEssenceType == null) | |
{ | |
_isEssenceType = Metadata.Contains("Metadata/Items/Currency/CurrencyEssence"); | |
} | |
return _isEssenceType.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the breach shard type and false if not. | |
/// </summary> | |
public bool IsBreachShardType | |
{ | |
get | |
{ | |
if (_isBreachShard == null) | |
{ | |
_isBreachShard = | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachFireShard") || | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachColdShard") || | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachLightningShard") || | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachPhysicalShard") || | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachChaosShard"); | |
} | |
return _isBreachShard.Value; | |
} | |
} | |
/// <summary> | |
/// Returns true if this item is of the breach upgrade type and false if not. | |
/// </summary> | |
public bool IsBreachUpgradeType | |
{ | |
get | |
{ | |
if (_isBreachUpgrade == null) | |
{ | |
_isBreachUpgrade = | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachUpgradeUniqueFire") || | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachUpgradeUniqueCold") || | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachUpgradeUniqueLightning") || | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachUpgradeUniquePhysical") || | |
Metadata.Equals("Metadata/Items/Currency/CurrencyBreachUpgradeUniqueChaos"); | |
} | |
return _isBreachUpgrade.Value; | |
} | |
} | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment