protected ItemTemplate(StatsSet set) { ItemId = set.GetInt("item_id"); Name = set.GetString("name"); Type1 = set.GetInt("type1"); Type2 = set.GetInt("type2"); Weight = set.GetInt("weight"); MaterialType = (MaterialType)set.GetInt("material"); Duration = set.GetInt("duration", -1); BodyPart = ItemTable.Instance.Slots[set.GetString("bodypart", "none")]; ReferencePrice = set.GetInt("price"); CrystalType = CrystalType.Values.FirstOrDefault(x => x.Id == (CrystalTypeId)set.GetInt("crystal_type")); _crystalCount = set.GetInt("crystal_count"); Stackable = set.GetBool("stackable"); Sellable = set.GetBool("sellable", true); Dropable = set.GetBool("dropable", true); Destroyable = set.GetBool("destroyable", true); Tradable = set.GetBool("tradeable", true); //Depositable = set.GetBool("is_depositable", true); HeroItem = ((ItemId >= 6611) && (ItemId <= 6621)) || (ItemId == 6842); //IsOlyRestricted = set.GetBool("is_oly_restricted"); //DefaultAction = (ActionType)set.GetInt("default_action"); }
public Armor(StatsSet set) : base(set) { Type = Utilz.GetEnumFromString(set.GetString("armor_type", "none"), ArmorTypeId.None); AvoidModifier = set.GetInt("avoid_modify"); Pdef = set.GetInt("p_def"); Mdef = set.GetInt("m_def"); MpBonus = set.GetInt("mp_bonus"); HpBonus = set.GetInt("hp_bonus"); int bodyPart = BodyPart; if ((bodyPart == SlotNeck) || (bodyPart == SlotFace) || (bodyPart == SlotHair) || (bodyPart == SlotHairall) || ((bodyPart & SlotREar) != 0) || ((bodyPart & SlotLFinger) != 0) || ((bodyPart & SlotBack) != 0)) { Type1 = Type1WeaponRingEarringNecklace; Type2 = Type2Accessory; } else { if ((Type == ArmorType.None.Id) && (BodyPart == SlotLHand)) // retail define shield as NONE { Type = ArmorType.Shield.Id; } Type1 = Type1ShieldArmor; Type2 = Type2ShieldArmor; } }
public Weapon(StatsSet set) : base(set) { Type = Utilz.GetEnumFromString(set.GetString("weaponType", "none"), WeaponTypeId.None); SoulshotCount = set.GetInt("soulshots"); SpiritshotCount = set.GetInt("spiritshots"); PDam = set.GetInt("p_dam"); RndDam = set.GetInt("rnd_dam"); Critical = set.GetInt("critical"); HitModifier = set.GetDouble("hit_modify"); AvoidModifier = set.GetInt("avoid_modify"); ShieldDef = set.GetInt("shield_def"); ShieldDefRate = set.GetDouble("shield_def_rate"); AtkSpeed = set.GetInt("atk_speed"); AtkReuse = set.GetInt("atk_reuse", Type == WeaponTypeId.Bow ? 1500 : 0); MpConsume = set.GetInt("mp_consume"); MDam = set.GetInt("m_dam"); }
public EtcItem(StatsSet set) : base(set) { Type = Utilz.GetEnumFromString(set.GetString("item_type", "None"), EtcItemTypeId.None); }