コード例 #1
0
        public AbnormalityDatabase(string lang)
        {
            Abnormalities = new Dictionary <uint, Abnormality>();
            var hd = File.OpenText(AppDomain.CurrentDomain.BaseDirectory + "/resources/data/hotdot/hotdot-" + lang + ".tsv");

            while (true)
            {
                var l = hd.ReadLine();
                if (l == null)
                {
                    break;
                }
                if (l == "")
                {
                    continue;
                }
                var s        = l.Split('\t');
                var id       = uint.Parse(s[0]);
                var type     = s[1];
                var amount   = double.Parse(s[7], CultureInfo.InvariantCulture);
                var isBuff   = bool.Parse(s[3]);
                var isShow   = bool.Parse(s[14]);
                var name     = s[8];
                var tooltip  = s[11];
                var icon     = s[13];
                var abType   = (AbnormalityType)Enum.Parse(typeof(AbnormalityType), s[2]);
                var infinite = s[5] == "0";
                var ab       = new Abnormality(id, isShow, isBuff, infinite, abType);
                ab.SetIcon(icon);
                ab.SetInfo(name, tooltip);
                if (type.IndexOf("Absorb", StringComparison.Ordinal) > -1)
                {
                    ab.SetShield((uint)amount); //TODO: may just parse everything instead of doing this
                }
                if (Abnormalities.ContainsKey(id))
                {
                    if (!Abnormalities[id].IsShield && ab.IsShield)
                    {
                        Abnormalities[id] = ab;
                    }
                    if (ab.Infinity)
                    {
                        if (!Abnormalities[id].Infinity)
                        {
                            Abnormalities[id].Infinity = false;
                        }
                    }
                    continue;
                }
                Abnormalities.Add(id, ab);
            }
        }
コード例 #2
0
        public override void Load()
        {
            Abnormalities.Clear();
            //var hd = File.OpenText(FullPath);
            var lines = File.ReadAllLines(FullPath);

            foreach (var l in lines)
            {
                if (l == null)
                {
                    break;
                }
                if (l == "")
                {
                    continue;
                }
                var s        = l.Split('\t');
                var id       = uint.Parse(s[0]);
                var type     = s[1];
                var amount   = double.Parse(s[7], CultureInfo.InvariantCulture);
                var isBuff   = bool.Parse(s[3]);
                var isShow   = bool.Parse(s[14]);
                var name     = s[8];
                var tooltip  = s[11];
                var icon     = s[13];
                var abType   = (AbnormalityType)Enum.Parse(typeof(AbnormalityType), s[2]);
                var infinite = s[5] == "0";
                var ab       = new Abnormality(id, isShow, isBuff, infinite, abType);
                ab.SetIcon(icon);
                ab.SetInfo(name, tooltip);
                if (type.IndexOf("Absorb", StringComparison.Ordinal) > -1)
                {
                    ab.SetShield((uint)amount);                //TODO: may just parse everything instead of doing this
                }
                if (Abnormalities.TryGetValue(id, out var ex)) //.ContainsKey(id))
                {
                    if (!ex.IsShield && ab.IsShield)
                    {
                        Abnormalities[id] = ab;
                    }
                    if (ab.Infinity && !ex.Infinity)
                    {
                        ex.Infinity = false;
                    }
                    if (ex.Type != AbnormalityType.Debuff && ab.Type == AbnormalityType.Debuff)
                    {
                        ex.Type = AbnormalityType.Debuff;
                    }
                    if (!isBuff)
                    {
                        ex.IsBuff = false;
                    }
                    continue;
                }
                Abnormalities[id] = ab;
            }

            var meme = new Abnormality(10241024, true, true, true, AbnormalityType.Buff);

            meme.SetInfo("Foglio's aura", "Reduces your ping by $H_W_GOOD80$COLOR_END ms when one of $H_W_GOODFoglio$COLOR_END 's characters is nearby.$BRDoes not stack with Skill prediction.");
            meme.SetIcon("icon_items.bloodchipa_tex");

            Abnormalities[meme.Id] = meme;
        }
コード例 #3
0
        public override void Load()
        {
            Abnormalities.Clear();
            var lines = File.ReadAllLines(FullPath);

            foreach (var l in lines.Where(x => x != ""))
            {
                var s        = l.Split('\t');
                var id       = uint.Parse(s[0]);
                var isBuff   = bool.Parse(s[3]);
                var isShow   = bool.Parse(s[14]);
                var abType   = (AbnormalityType)Enum.Parse(typeof(AbnormalityType), s[2]);
                var infinite = s[5] == "0";
                var ab       = new Abnormality(id, isShow, isBuff, infinite, abType, s[13], s[8], s[11]);
                if (s[1].IndexOf("Absorb", StringComparison.Ordinal) > -1)
                {
                    var amount = double.Parse(s[7], CultureInfo.InvariantCulture);
                    ab.SetShield(amount); //TODO: may just parse everything instead of doing this
                }

                if (Abnormalities.TryGetValue(id, out var ex))
                {
                    if (!ex.IsShield && ab.IsShield)
                    {
                        Abnormalities[id] = ab;
                    }
                    if (ab.Infinity && !ex.Infinity)
                    {
                        ex.Infinity = false;
                    }
                    if (ex.Type != AbnormalityType.Debuff && ab.Type == AbnormalityType.Debuff)
                    {
                        ex.Type = AbnormalityType.Debuff;
                    }
                    if (!isBuff)
                    {
                        ex.IsBuff = false;
                    }
                    continue;
                }

                if (App.Settings.BuffWindowSettings.Specials.Contains(id) && ab.Type == AbnormalityType.Buff)
                {
                    ab.Type = AbnormalityType.Special;
                }

                Abnormalities[id] = ab;
            }

            var foglioAura = new Abnormality(10241024, true, true, true, AbnormalityType.Special, "icon_items.bloodchipa_tex", "Foglio's aura", "Reduces your ping by $H_W_GOOD80$COLOR_END ms when one of $H_W_GOODFoglio$COLOR_END 's characters is nearby.$BRDoes not stack with Skill prediction.");

            Abnormalities[foglioAura.Id] = foglioAura;

            var fearInoculum = new Abnormality(30082019, true, true, true, AbnormalityType.Special, "icon_status.third_eye_ab", "Fear Inoculum", "New $H_W_GOODTool$COLOR_END album release provides the following effects:$BR - increases attack speed by $H_W_GOOD25%$COLOR_END $BR - increases skill damage by $H_W_GOOD100%$COLOR_END $BR - decreases skill cooldowns by $H_W_GOOD80%$COLOR_END $BR - increases drop rate in dungeons by $H_W_GOOD800%$COLOR_END $BR$BREffect only applies while Tool music is playing.");

            Abnormalities[fearInoculum.Id] = fearInoculum;

            #region Extreme overrides
            // Twisted Fate
            Abnormalities[781066].ToolTip = Abnormalities[781066].ToolTip.Replace("60", "3");

            // Broken Ball
            Abnormalities[44300011].ToolTip = "Increases Physical and Magic Amplification by $H_W_GOOD250$COLOR_END per stack";

            // Larva Venom
            Abnormalities[44300080].ToolTip = Abnormalities[44300080].ToolTip.Replace("3s", "2s");

            // God's Wrath
            Abnormalities[91100400].ToolTip = "Reduces Endurance, Power and Movement Speed by $H_W_BAD4%$COLOR_END$BRReduces Attack Speed by $H_W_BAD3%$COLOR_END";

            // Demokron's Curse
            Abnormalities[777034].ToolTip = "Boss HP 100%~30%$BR - Increases Physical and Magic Amplification by $H_W_GOOD7k$COLOR_END$BR - Reduces HP by $H_W_BAD3%$COLOR_END per 1s$BR$BRBoss HP 30%~0%$BR - Increases Physical and Magic Amplification by $H_W_GOOD7k$COLOR_END$BR - Reduces HP by $H_W_BAD2%$COLOR_END per 1s$BR - $H_W_BADCannot be cleansed$COLOR_END";
            #endregion

            #region Corrupted Skynest overrides

            // Doomfire
            Abnormalities[30260001].IsBuff = true;
            // Doomchill
            Abnormalities[30260002].IsBuff = true;

            #endregion
        }
コード例 #4
0
        public AbnormalityDatabase(string lang)
        {
            //var f = File.OpenText(Environment.CurrentDirectory + "/resources/data/abnormalities/abnormals-"+lang+".tsv");
            Abnormalities = new Dictionary <uint, Abnormality>();
            //while (true)
            //{
            //    var line = f.ReadLine();
            //    if (line == null) break;

            //    var s = line.Split('\t');

            //    var id = Convert.ToUInt32(s[0]);
            //    Enum.TryParse(s[1], out AbnormalityType t);
            //    var isShow = bool.Parse(s[2]);
            //    var isBuff = bool.Parse(s[3]);
            //    var infinity = bool.Parse(s[4]);
            //    var name = s[5];
            //    var tooltip = s[6].Replace("&#xA;", "\n");
            //    tooltip = tooltip.Replace("&#xD;", "\r");
            //    var iconName = s[7];

            //    //---add fixes here---//

            //    if(id == 78100006) //isBuff = true for lakan's souls world debuff (it's not supposed to make hp bar purple)
            //    {
            //        isBuff = true;
            //    }

            //    //--------------------//
            //    var ab = new Abnormality(id, isShow, isBuff, infinity, t);
            //    ab.SetIcon(iconName);
            //    ab.SetInfo(name, tooltip);

            //    Abnormalities.Add(id, ab);
            //}
            var hd = File.OpenText(Environment.CurrentDirectory + "/resources/data/abnormalities/hotdot-" + lang + ".tsv");

            while (true)
            {
                var l = hd.ReadLine();
                if (l == null)
                {
                    break;
                }

                var s       = l.Split('\t');
                var id      = uint.Parse(s[0]);
                var type    = s[1];
                var amount  = double.Parse(s[7], CultureInfo.InvariantCulture);
                var isBuff  = bool.Parse(s[3]);
                var isShow  = bool.Parse(s[14]);
                var name    = s[8];
                var tooltip = s[11];
                var icon    = s[13];
                var abType  = (AbnormalityType)Enum.Parse(typeof(AbnormalityType), s[2]);
                //var isBuff = bool.Parse(s[15]);
                var infinite = s[5] == "0";
                var ab       = new Abnormality(id, isShow, isBuff, infinite, abType);
                ab.SetIcon(icon);
                ab.SetInfo(name, tooltip);
                if (type.IndexOf("Absorb", StringComparison.Ordinal) > -1)
                {
                    ab.SetShield((uint)amount); //TODO: may just parse everything instead of doing this
                }
                if (Abnormalities.ContainsKey(id))
                {
                    if (!Abnormalities[id].IsShield && ab.IsShield)
                    {
                        Abnormalities[id] = ab;
                    }
                    if (ab.Infinity)
                    {
                        if (!Abnormalities[id].Infinity)
                        {
                            Abnormalities[id].Infinity = true;
                        }
                    }
                    continue;
                }
                Abnormalities.Add(id, ab);
            }
        }