public int Values(IntValueKey key, int defaultValue = 0) { if (IntValues.ContainsKey((int)key)) { return(IntValues[(int)key]); } return(defaultValue); }
/// <summary> /// If input is not a IID, 0 will be returned /// </summary> public static uint ConvertToIID(IntValueKey input) { if (input == IntValueKey.Container_Decal_IID) { return(2); // CONTAINER_IID } if (input == IntValueKey.Wielder_Decal_IID) { return(3); // WIELDER_IID } if (input == IntValueKey.Monarch_Decal_IID) { return(26); // MONARCH_IID } if (input == IntValueKey.HouseOwner_Decal_IID) { return(32); // HOUSE_OWNER_IID } return(0); }
public int GetBuffedLogValueKey(IntValueKey key, int defaultValue) { if (!gameItemInfo.KeyExistsInt((int)key)) { return(defaultValue); } int value = gameItemInfo.GetValueInt(key, defaultValue); for (int i = 0; i < gameItemInfo.Spells.Count; i++) { int spellId = gameItemInfo.Spells[i].Id; if (LongValueKeySpellEffects.ContainsKey(spellId) && LongValueKeySpellEffects[spellId].Key == key && LongValueKeySpellEffects[spellId].Bonus != 0) { value += (int)LongValueKeySpellEffects[spellId].Bonus; } } return(value); }
/// <summary> /// If input is not a DID, 0 will be returned /// </summary> public static uint ConvertToDID(IntValueKey input) { if (input == IntValueKey.Setup_Decal_DID) { return(1); // SETUP_DID } if (input == IntValueKey.Icon_Decal_DID) { return(8); // ICON_DID } if (input == IntValueKey.Spell_Decal_DID) { return(28); // SPELL_DID } if (input == IntValueKey.IconOverlay_Decal_DID) { return(50); // ICON_OVERLAY_DID } if (input == IntValueKey.IconUnderlay_Decal_DID) { return(52); // ICON_UNDERLAY_DID } return(0); }
public bool TryGetValue(IntValueKey index, out int value) { return this._longValues.TryGetValue((int)index, out value); }
public int Values(IntValueKey index, int defaultValue) { int value; if (this._longValues.TryGetValue((int)index, out value)) { return value; } return defaultValue; }
public int Values(IntValueKey index) { return this.Values(index, 0); }
public bool Exists(IntValueKey index) { return this._longValues.ContainsKey((int)index); }
public int Values(IntValueKey index) { return Values((LongValueKey)(int)index); }
/// <summary> /// Converts a decal specific IntValueKey to the actual IntValueKey. /// If this is not an IntValueKey, 0 will be returned. /// </summary> public static uint ConvertToInt(IntValueKey input) { if (input == IntValueKey.Category_Decal) { return((int)IntValueKey.ItemType); } if (input == IntValueKey.Coverage_Decal) { return((int)IntValueKey.ClothingPriority); } if (input == IntValueKey.ItemSlots_Decal) { return((int)IntValueKey.ItemsCapacity); } if (input == IntValueKey.PackSlots_Decal) { return((int)IntValueKey.ContainersCapacity); } if (input == IntValueKey.EquipableSlots_Decal) { return((int)IntValueKey.ValidLocations); } //if (input == IntValueKey.WieldingSlot_Decal) return (int)IntValueKey.CurrentWieldedLocation; if (input == IntValueKey.StackMax_Decal) { return((int)IntValueKey.MaxStackSize); } if (input == IntValueKey.StackCount_Decal) { return((int)IntValueKey.StackSize); } if (input == IntValueKey.IconOutline_Decal) { return((int)IntValueKey.UiEffects); } if (input == IntValueKey.MaxDamage_Decal) { return((int)IntValueKey.Damage); } if (input == IntValueKey.DamageType_Decal) { return((int)IntValueKey.DamageType); } if (input == IntValueKey.EquipSkill_Decal) { return((int)IntValueKey.WeaponSkill); } if (input == IntValueKey.WeapSpeed_Decal) { return((int)IntValueKey.WeaponTime); } if (input == IntValueKey.MissileType_Decal) { return((int)IntValueKey.AmmoType); } if (input == IntValueKey.EquipType_Decal) { return((int)IntValueKey.CombatUse); } if (input == IntValueKey.UsageMask_Decal) { return((int)IntValueKey.TargetType); } if (input == IntValueKey.HookMask_Decal) { return((int)IntValueKey.HookType); } return(0); }
public int Values(IntValueKey index, int defaultValue) { throw new NotImplementedException(); }
public bool Exists(IntValueKey index) { throw new NotImplementedException(); }
public int GetBuffedLogValueKey(IntValueKey key) { return(GetBuffedLogValueKey(key, 0)); }
public bool TryGetValue(IntValueKey index, out int value) { return TryGetValue((LongValueKey)(int)index, out value); }
public int Values(IntValueKey index, int defaultValue) { return Values((LongValueKey)(int)index, defaultValue); }
public static int IndexFromLVK(IntValueKey k) { return(LVKOptions.IndexOf(k)); }
public bool TryGetValue(IntValueKey index, out int value) { throw new NotImplementedException(); }
public int GetValueInt(IntValueKey key, int defaultvalue) { return(this.GetValueInt((int)key, defaultvalue)); }
public static int IndexFromLVK(IntValueKey k) { return LVKOptions.IndexOf(k); }
public static bool IsIDProperty(IntValueKey vk) { switch (vk) { case IntValueKey.CreateFlags1: return(false); case IntValueKey.Type: return(false); case IntValueKey.Icon: return(false); case IntValueKey.Category: return(false); case IntValueKey.Behavior: return(false); case IntValueKey.CreateFlags2: return(false); case IntValueKey.IconUnderlay: return(false); case IntValueKey.ItemSlots: return(false); case IntValueKey.PackSlots: return(false); case IntValueKey.MissileType: return(false); case IntValueKey.Value: return(false); case IntValueKey.Unknown10: return(false); case IntValueKey.UsageMask: return(false); case IntValueKey.IconOutline: return(false); case IntValueKey.EquipType: return(false); case IntValueKey.UsesRemaining: return(false); case IntValueKey.UsesTotal: return(false); case IntValueKey.StackCount: return(false); case IntValueKey.StackMax: return(false); case IntValueKey.Container: return(false); case IntValueKey.Slot: return(false); case IntValueKey.EquipableSlots: return(false); case IntValueKey.EquippedSlots: return(false); case IntValueKey.Coverage: return(false); case IntValueKey.Unknown100000: return(false); case IntValueKey.Unknown800000: return(false); case IntValueKey.Unknown8000000: return(false); //case IntValueKey.Burden: return false; //case IntValueKey.OwnedBy: return false; case IntValueKey.Monarch: return(false); case IntValueKey.HookMask: return(false); case IntValueKey.IconOverlay: return(false); case IntValueKey.Material: return(false); default: return(true); } }
public bool Exists(IntValueKey index) { return Exists((LongValueKey)(int)index); }