public GenericWeapon(InventorySlotTypeMask slot, DamageInfo[] damages, SkillId skill, float minRange, float maxRange, int attackTime) { InventorySlotMask = slot; Damages = damages; Skill = skill; MinRange = minRange; MaxRange = maxRange; AttackTime = attackTime; }
public GenericWeapon(bool isRanged, DamageInfo[] damages, SkillId skill, float minRange, float maxRange, int attackTime) { IsRanged = isRanged; IsMelee = !isRanged; Damages = damages; Skill = skill; MinRange = minRange; MaxRange = maxRange; AttackTime = attackTime; }
public GenericWeapon(InventorySlotTypeMask slot, int damageCount) { InventorySlotMask = slot; Damages = new DamageInfo[damageCount]; }
public GenericWeapon(bool isRanged, int damageCount) { IsRanged = isRanged; IsMelee = !isRanged; Damages = new DamageInfo[damageCount]; }
public GenericWeapon(InventorySlotTypeMask slot, int damageCount) { InventorySlotMask = slot; Damages = new DamageInfo[damageCount]; IsWeapon = true; }
public void Dump(TextWriter writer, string indent) { writer.WriteLine(indent + DefaultName + " (ID: " + Id + " [" + ItemId + "])"); indent += "\t"; string str = indent; writer.WriteLine(str + "Infos:"); indent += "\t"; if (Class != ItemClass.None) { writer.WriteLine(indent + "Class: " + Class); } if (SubClass != ItemSubClass.WeaponAxe) { writer.WriteLine(indent + "SubClass " + SubClass); } if (DisplayId != 0U) { writer.WriteLine(indent + "DisplayId: " + DisplayId); } writer.WriteLine(indent + "Quality: " + Quality); if (Flags != ItemFlags.None) { writer.WriteLine(indent + "Flags: " + Flags); } if (Flags2 != 0) { writer.WriteLine(indent + "Flags2: " + Flags2); } if (BuyPrice != 0U) { writer.WriteLine(indent + "BuyPrice: " + Utility.FormatMoney(BuyPrice)); } if (SellPrice != 0U) { writer.WriteLine(indent + "SellPrice: " + Utility.FormatMoney(SellPrice)); } if (Level != 0U) { writer.WriteLine(indent + "Level: " + Level); } if (RequiredLevel != 0U) { writer.WriteLine(indent + "RequiredLevel: " + RequiredLevel); } if (InventorySlotType != InventorySlotType.None) { writer.WriteLine(indent + "InventorySlotType: " + InventorySlotType); } if (UniqueCount != 0) { writer.WriteLine(indent + "UniqueCount: " + UniqueCount); } if (MaxAmount != 1) { writer.WriteLine(indent + "MaxAmount: " + MaxAmount); } if (ContainerSlots != 0) { writer.WriteLine(indent + "ContainerSlots: " + ContainerSlots); } if (BlockValue != 0U) { writer.WriteLine(indent + "BlockValue: " + BlockValue); } List <string> collection1 = new List <string>(11); for (int index = 0; index < Mods.Length; ++index) { StatModifier mod = Mods[index]; if (mod.Value != 0) { collection1.Add((mod.Value > 0 ? "+" : "") + mod.Value + " " + mod.Type); } } if (collection1.Count > 0) { writer.WriteLine(indent + "Modifiers: " + collection1.ToString("; ")); } List <string> collection2 = new List <string>(5); for (int index = 0; index < Damages.Length; ++index) { DamageInfo damage = Damages[index]; if (damage.Maximum != 0.0) { collection2.Add(((double)damage.Minimum) + "-" + damage.Maximum + " " + damage.School); } } if (collection2.Count > 0) { writer.WriteLine(indent + "Damages: " + collection2.ToString("; ")); } if (AttackTime != 0) { writer.WriteLine(indent + "AttackTime: " + AttackTime); } List <string> collection3 = new List <string>(5); for (DamageSchool damageSchool = DamageSchool.Physical; damageSchool < DamageSchool.Count; ++damageSchool) { int resistance = Resistances[(int)damageSchool]; if (resistance > 0) { collection3.Add((resistance > 0 ? "+" : "") + resistance + " " + damageSchool); } } if (collection3.Count > 0) { writer.WriteLine(indent + "Resistances: " + collection3.ToString("; ")); } List <ItemSpell> collection4 = new List <ItemSpell>(); foreach (ItemSpell spell in Spells) { if (spell.Id != SpellId.None) { collection4.Add(spell); } } if (collection4.Count > 0) { writer.WriteLine(indent + "Spells: " + collection4.ToString("; ")); } if (BondType != ItemBondType.None) { writer.WriteLine(indent + "Binds: " + BondType); } if (PageTextId != 0U) { writer.WriteLine(indent + "PageId: " + PageTextId); } if (PageMaterial != PageMaterial.None) { writer.WriteLine(indent + "PageMaterial: " + PageMaterial); } if (LanguageId != ChatLanguage.Universal) { writer.WriteLine(indent + "LanguageId: " + LanguageId); } if (LockId != 0U) { writer.WriteLine(indent + "Lock: " + LockId); } if (Material != Material.None2) { writer.WriteLine(indent + "Material: " + Material); } if (Duration != 0) { writer.WriteLine(indent + "Duration: " + Duration); } if (SheathType != SheathType.None) { writer.WriteLine(indent + "SheathType: " + SheathType); } if (RandomPropertiesId != 0U) { writer.WriteLine(indent + "RandomPropertyId: " + RandomPropertiesId); } if (RandomSuffixId != 0U) { writer.WriteLine(indent + "RandomSuffixId: " + RandomSuffixId); } if (SetId != ItemSetId.None) { writer.WriteLine(indent + "Set: " + SetId); } if (MaxDurability != 0) { writer.WriteLine(indent + "MaxDurability: " + MaxDurability); } if (MapId != MapId.Silaris) { writer.WriteLine(indent + "Map: " + MapId); } if (ZoneId != ZoneId.None) { writer.WriteLine(indent + "Zone: " + ZoneId); } if (BagFamily != ItemBagFamilyMask.None) { writer.WriteLine(indent + "BagFamily: " + BagFamily); } if (ToolCategory != ToolCategory.None) { writer.WriteLine(indent + "TotemCategory: " + ToolCategory); } List <string> collection5 = new List <string>(3); foreach (SocketInfo socket in Sockets) { if (socket.Color != SocketColor.None || socket.Content != 0) { collection5.Add(((int)socket.Color) + " (" + socket.Content + ")"); } } if (collection5.Count > 0) { writer.WriteLine(indent + "Sockets: " + collection5.ToString("; ")); } if (GemProperties != null) { writer.WriteLine(indent + "GemProperties: " + GemProperties); } if (ArmorModifier != 0.0) { writer.WriteLine(indent + "ArmorModifier: " + ArmorModifier); } if (RequiredDisenchantingLevel != -1 && RequiredDisenchantingLevel != 0) { writer.WriteLine(indent + "RequiredDisenchantingLevel: " + RequiredDisenchantingLevel); } if (DefaultDescription.Length > 0) { writer.WriteLine(indent + "Desc: " + DefaultDescription); } writer.WriteLine(str + "Requirements:"); if (RequiredClassMask != (ClassMask)262143 && RequiredClassMask != ClassMask.AllClasses2) { writer.WriteLine(indent + "Classes: " + RequiredClassMask); } if (RequiredRaceMask != RaceMask.AllRaces1) { writer.WriteLine(indent + "Races: " + RequiredRaceMask); } if (RequiredSkillId != SkillId.None) { writer.WriteLine(indent + "Skill: " + RequiredSkillValue + " " + RequiredSkillId); } if (RequiredProfessionId != SpellId.None) { writer.WriteLine(indent + "Profession: " + RequiredProfessionId); } if (RequiredPvPRank != 0U) { writer.WriteLine(indent + "PvPRank: " + RequiredPvPRank); } if (UnknownRank != 0U) { writer.WriteLine(indent + "UnknownRank: " + UnknownRank); } if (RequiredFactionId != FactionId.None) { writer.WriteLine(indent + "Faction: " + RequiredFactionId + " (" + RequiredFactionStanding + ")"); } if (QuestId != 0U) { writer.WriteLine(indent + "Quest: " + QuestId); } if (QuestHolderInfo == null) { return; } if (QuestHolderInfo.QuestStarts.Count > 0) { writer.WriteLine(indent + "QuestStarts: " + QuestHolderInfo.QuestStarts.ToString(", ")); } if (QuestHolderInfo.QuestEnds.Count <= 0) { return; } writer.WriteLine(indent + "QuestEnds: " + QuestHolderInfo.QuestEnds.ToString(", ")); }