示例#1
0
        protected override void Parse()
        {
            var x = Enum.GetValues(typeof(ElementAttribute));

            foreach (var e in x)
            {
                _data.Add((ElementAttribute)e, 0);
            }


            this[ElementAttribute.Physical] = (ClilocHelper.GetIndex(_lastmetatable, 1060448) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1060448)[0]
                : 0;
            this[ElementAttribute.Fire] = (ClilocHelper.GetIndex(_lastmetatable, 1060447) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1060447)[0]
                : 0;
            this[ElementAttribute.Cold] = (ClilocHelper.GetIndex(_lastmetatable, 1060445) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1060445)[0]
                : 0;
            this[ElementAttribute.Poison] = (ClilocHelper.GetIndex(_lastmetatable, 1060449) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1060449)[0]
                : 0;
            this[ElementAttribute.Energy] = (ClilocHelper.GetIndex(_lastmetatable, 1060446) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1060446)[0]
                : 0;
            base.Parse();
        }
示例#2
0
        public static dynamic[] ReadSkillBonus(this SkillBonuses attrib, uint ClilocID, List <ClilocItemRec> properties)
        {
            var result = new dynamic[2];

            if ((ClilocHelper.GetIndex(properties, ClilocID) > -1))
            {
                var p = ClilocHelper.GetParams(properties, ClilocID);
                result[0] = (SkillName)p[0];
                result[1] = p[1];
            }
            else
            {
                result[0] = SkillName.Invalid;
                result[1] = 0.0;
            }
            return(result);
        }
示例#3
0
        protected override void Parse()
        {
            var x = Enum.GetValues(typeof(AbsorptionAttribute));

            foreach (var e in x)
            {
                _data.Add((AbsorptionAttribute)e, 0);
            }

            this[AbsorptionAttribute.KineticEater] = (ClilocHelper.GetIndex(_lastmetatable, 1113597) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113597)[0]
                : 0;
            this[AbsorptionAttribute.FireEater] = (ClilocHelper.GetIndex(_lastmetatable, 1113593) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113593)[0]
                : 0;
            this[AbsorptionAttribute.ColdEater] = (ClilocHelper.GetIndex(_lastmetatable, 1113594) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113594)[0]
                : 0;
            this[AbsorptionAttribute.PoisonEater] = (ClilocHelper.GetIndex(_lastmetatable, 1113595) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113595)[0]
                : 0;
            this[AbsorptionAttribute.EnergyEater] = (ClilocHelper.GetIndex(_lastmetatable, 1113596) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113596)[0]
                : 0;
            this[AbsorptionAttribute.DamageEater] = (ClilocHelper.GetIndex(_lastmetatable, 1113598) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113598)[0]
                : 0;
            this[AbsorptionAttribute.KineticResonance] = (ClilocHelper.GetIndex(_lastmetatable, 1113695) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113695)[0]
                : 0;
            this[AbsorptionAttribute.FireResonance] = (ClilocHelper.GetIndex(_lastmetatable, 1113691) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113691)[0]
                : 0;
            this[AbsorptionAttribute.ColdResonance] = (ClilocHelper.GetIndex(_lastmetatable, 1113692) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113692)[0]
                : 0;
            this[AbsorptionAttribute.PoisonResonance] = (ClilocHelper.GetIndex(_lastmetatable, 1113693) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113693)[0]
                : 0;
            this[AbsorptionAttribute.EnergyResonance] = (ClilocHelper.GetIndex(_lastmetatable, 1113694) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113694)[0]
                : 0;
            base.Parse();
        }
示例#4
0
        protected override void Parse()
        {
            var x = Enum.GetValues(typeof(ArmorAttribute));

            foreach (var e in x)
            {
                _data.Add((ArmorAttribute)e, 0);
            }

            this[ArmorAttribute.MageArmor]  = (ClilocHelper.Contains(_lastmetatable, 1060437));
            this[ArmorAttribute.SelfRepair] = (ClilocHelper.GetIndex(_lastmetatable, 1060450) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1060450)[0]
                : 0;
            this[ArmorAttribute.SoulCharge] = (ClilocHelper.GetIndex(_lastmetatable, 1113630) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1113630)[0]
                : 0;
            this[ArmorAttribute.ReactiveParalyze] = (ClilocHelper.Contains(_lastmetatable, 1112364));
            this[ArmorAttribute.LowerStatReq]     = (ClilocHelper.GetIndex(_lastmetatable, 1061170) > -1)
                ? ClilocHelper.GetParams(_lastmetatable, 1061170)[0]
                : 0;

            base.Parse();
        }
示例#5
0
        public static ItemValue GetItemValue(this Item item)
        {
            if (!XConfig.Engine.Equals(ShardEngine.RebirthUO))
            {
                return(ItemValue.None);
            }

            if (!item.Valid)
            {
                return(ItemValue.None);
            }
            var props = item.Properties;

            if (ClilocHelper.GetIndex(props, 1150541) > -1)
            {
                var value = ClilocHelper.GetParams(props, 1150541)[0];
                if (value.Equals("[ <BASEFONT COLOR=#FFFAFA>Common<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.Common);
                }
                if (value.Equals("[ <BASEFONT COLOR=#1EFF00>Uncommon<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.Uncommon);
                }
                if (value.Equals("[ <BASEFONT COLOR=#0070FF>Rare<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.Rare);
                }
                if (value.Equals("[ <BASEFONT COLOR=#A335EE>Epic<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.Epic);
                }
                if (value.Equals("[ <BASEFONT COLOR=#FF8000>Legendary<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.Legendary);
                }
                if (value.Equals("[ <BASEFONT COLOR=#FF0000>Event<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.Event);
                }
                if (value.Equals("[ <BASEFONT COLOR=#B0E0E6>One Of A Kind<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.OOAK);
                }
                if (value.Equals("[ <BASEFONT COLOR=#FFFF00>Artifact<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.Artifact);
                }
                if (value.Equals("[ <BASEFONT COLOR=#580b1c>ITS - Artifact<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.ITSArtifact);
                }
                if (value.Equals("[ <BASEFONT COLOR=#7CFC00>Newbie<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.Newbie);
                }
                if (value.Equals("[ <BASEFONT COLOR=#D8BFD8>Set Item<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.SetItem);
                }
                if (value.Equals("[ <BASEFONT COLOR=#FF69B4>Donation<BASEFONT COLOR=#FFFFFF> ]"))
                {
                    return(ItemValue.Donation);
                }
            }
            return(ItemValue.None);
        }