Beispiel #1
0
        protected void AddLocalizedGameString(Hero hero)
        {
            GameStringWriter.AddUnitName(hero.Id, hero.Name);
            GameStringWriter.AddUnitDifficulty(hero.Id, hero.Difficulty);

            if (hero.Type != null)
            {
                GameStringWriter.AddUnitType(hero.Id, GetTooltip(hero.Type, FileOutputOptions.DescriptionType));
            }

            if (hero.Description != null)
            {
                GameStringWriter.AddUnitDescription(hero.Id, GetTooltip(hero.Description, FileOutputOptions.DescriptionType));
            }

            if (hero.InfoText != null)
            {
                GameStringWriter.AddUnitInfoText(hero.Id, GetTooltip(hero.InfoText, FileOutputOptions.DescriptionType));
            }

            GameStringWriter.AddUnitLifeType(hero.Id, hero.Life.LifeType);
            GameStringWriter.AddUnitEnergyType(hero.Id, hero.Energy.EnergyType);
            GameStringWriter.AddUnitShieldType(hero.Id, hero.Shield.ShieldType);
            GameStringWriter.AddHeroTitle(hero.Id, hero.Title);
            GameStringWriter.AddHeroSearchText(hero.Id, hero.SearchText);

            if (hero.Roles.Count > 0)
            {
                GameStringWriter.AddUnitRole(hero.Id, string.Join(",", hero.Roles));
            }

            GameStringWriter.AddUnitExpandedRole(hero.Id, hero.ExpandedRole);
        }