Ejemplo n.º 1
0
        private void ContainerTierAudit2(string containerName, int tier, ItemGroups.ItemGroupStats itemGroupStats, Mag.Shared.Spells.Spell.BuffLevels minBuffLevel, Mag.Shared.Spells.Spell.BuffLevels maxBuffLevel)
        {
            foreach (var item in itemGroupStats.Items)
            {
                if (!item.LongValues.ContainsKey(IntValueKey.Workmanship))
                {
                    continue;
                }

                foreach (var spellId in item.Spells)
                {
                    var spell = Mag.Shared.Spells.SpellTools.GetSpell(spellId);

                    if (spell.BuffLevel == Mag.Shared.Spells.Spell.BuffLevels.None)
                    {
                        continue;
                    }

                    if (spell.BuffLevel < minBuffLevel || spell.BuffLevel > maxBuffLevel)
                    {
                        File.AppendAllText(Path.Combine(txtOutputPath.Text, "Tier Container Audit.txt"), $"containerName: {containerName.PadRight(30)}, tier: {tier}, item: 0x{item.Id:X8}:{item.StringValues[Mag.Shared.Constants.StringValueKey.Name].PadRight(30)}, has spell: {spell}" + Environment.NewLine);
                        outputAuditLine = true;
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void ContainerTierAuditWieldReqsInner(string containerName, int tier, ItemGroups.ItemGroupStats itemGroupStats, int wieldRequirements, HashSet <int> wieldSkillType, HashSet <int> validWieldDifficulties)
        {
            foreach (var item in itemGroupStats.Items)
            {
                if (!item.LongValues.ContainsKey(IntValueKey.ItemWorkmanship))
                {
                    continue;
                }

                if (!item.LongValues.ContainsKey(IntValueKey.WieldRequirements))
                {
                    continue;
                }

                if (item.LongValues[IntValueKey.WieldRequirements] != wieldRequirements)
                {
                    continue;
                }

                if (!item.LongValues.ContainsKey(IntValueKey.WieldSkillType))
                {
                    continue;
                }

                if (!wieldSkillType.Contains(item.LongValues[IntValueKey.WieldSkillType]))
                {
                    continue;
                }

                if (!item.LongValues.ContainsKey(IntValueKey.WieldDifficulty))
                {
                    continue;
                }

                if (!validWieldDifficulties.Contains(item.LongValues[IntValueKey.WieldDifficulty]))
                {
                    File.AppendAllText(Path.Combine(txtOutputPath.Text, "Tier Container Audit.txt"), $"containerName: {containerName.PadRight(30)}, tier: {tier}, item: 0x{item.Id:X8}:{item.StringValues[StringValueKey.Name].PadRight(30)}, has WieldRequirements: {item.LongValues[IntValueKey.WieldRequirements]}, WieldSkillType: {item.LongValues[IntValueKey.WieldSkillType]}, WieldDifficulty: {item.LongValues[IntValueKey.WieldDifficulty]}, Calculated Item Tier: {TierCalculator.Calculate(new List<IdentResponse> { item })}" + Environment.NewLine);
                    outputAuditLine = true;
                }
            }
        }