public IEquipment Convert(Item item) { EquipSlot es = LEGACY_EQUIP_TYPE[item.itemType]; CharClassType cct = CharClassConverter.LEGACY_CLASS_TYPE[item.forClass]; return(new Equipment(item.itemID, item.inventoryID, item.itemName, item.description, es, (byte)item.itemRarity, item.itemFind, item.preventDeathBonus, item.successChance, item.xpBonus, item.coinBonus, cct)); }
new public bool Equals(Object o) { if (o == null || !(o is EquipSlot)) { return(false); } EquipSlot es = (EquipSlot)o; return(this.ID == es.ID && this.Name.Equals(es.Name)); }
public Equipment(long id, long invId, string name, string desc, EquipSlot es, byte rarity, int itmfnd, float pdb, float sc, int xb, int cb, params CharClassType[] ccts) { this.ID = id; this.InventoryID = invId; this.Name = name; this.Description = desc; this.EquipSlot = es; this.Rarirty = rarity; this.ItemFind = itmfnd; this.PreventDeathBonus = pdb; this.SuccessChance = sc; this.XpBonus = xb; this.CoinBonus = cb; this.ForClasses = ccts; }