Exemple #1
0
        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;
            }
        }
Exemple #2
0
        public CharTemplate(StatsSet set)
        {
            BaseStr = set.GetInt("str", 40);
            BaseCon = set.GetInt("con", 21);
            BaseDex = set.GetInt("dex", 30);
            BaseInt = set.GetInt("int", 20);
            BaseWit = set.GetInt("wit", 43);
            BaseMen = set.GetInt("men", 20);

            _baseHpMax = set.GetDouble("hp");
            _baseMpMax = set.GetDouble("mp");

            BaseHpReg = set.GetDouble("hpRegen", 1.5d);
            BaseMpReg = set.GetDouble("mpRegen", 0.9d);

            BasePAtk = set.GetDouble("pAtk");
            BaseMAtk = set.GetDouble("mAtk");
            BasePDef = set.GetDouble("pDef");
            BaseMDef = set.GetDouble("mDef");

            BasePAtkSpd = set.GetInt("atkSpd", 300);

            BaseCritRate = set.GetInt("crit", 4);

            BaseWalkSpd = set.GetInt("walkSpd");
            BaseRunSpd  = set.GetInt("runSpd", 1);

            CollisionRadius = set.GetDouble("radius");
            CollisionHeight = set.GetDouble("height");
        }
Exemple #3
0
        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");
        }
Exemple #4
0
 public Henna(StatsSet set)
 {
     SymbolId = set.GetInt("symbol_id");
     Dye      = set.GetInt("dye");
     Price    = set.GetInt("price");
     StatInt  = set.GetInt("INT");
     StatStr  = set.GetInt("STR");
     StatCon  = set.GetInt("CON");
     StatMen  = set.GetInt("MEN");
     StatDex  = set.GetInt("DEX");
     StatWit  = set.GetInt("WIT");
 }
Exemple #5
0
 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");
 }