예제 #1
0
        private void ContainerTierAudit(Stats stats, int tier, Mag.Shared.Spells.Spell.BuffLevels minBuffLevel, Mag.Shared.Spells.Spell.BuffLevels maxBuffLevel)
        {
            if (stats.Tier != tier)
            {
                return;
            }

            foreach (var itemGroupStats in stats.ObjectClasses.Values)
            {
                ContainerTierAudit2(stats.ContainerName, tier, itemGroupStats, minBuffLevel, maxBuffLevel);
            }
        }
예제 #2
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;
                    }
                }
            }
        }