Do soemthing i guess?

This commit is contained in:
SilicaAndPina 2021-02-06 14:18:19 +13:00
parent 5e460923dc
commit cb00f79d48
7 changed files with 748 additions and 1084 deletions

View file

@ -243,6 +243,7 @@ namespace HISP.Game
public static string HorseIsTrainable;
public static string HorseCannotMountUntilTackedMessage;
public static string HorseDismountedBecauseNotTackedMessageFormat;
public static string HorseMountButtonFormat;
public static string HorseDisMountButtonFormat;
public static string HorseFeedButtonFormat;
@ -765,7 +766,10 @@ namespace HISP.Game
{
return HorseCompanionEntryFormat.Replace("%ICONID%", icon.ToString()).Replace("%COUNT%", count.ToString("N0")).Replace("%NAME%", name).Replace("%ID%", id.ToString());
}
public static string FormatHorseDismountedBecauseTackedMessage(string horsename)
{
return HorseDismountedBecauseNotTackedMessageFormat.Replace("%HORSENAME%", horsename);
}
public static string FormatAutoSellConfirmedMessage(int money)
{
return HorseAutoSellConfirmedFormat.Replace("%MONEY%", money.ToString("N0"));

View file

@ -1430,7 +1430,7 @@ namespace HISP.Game
message += Messages.FormatHorseAdvancedStat(agilityStat.BreedValue, agilityStat.CompanionOffset, agilityStat.TackOffset, agilityStat.MaxValue);
message += Messages.FormatHorseAdvancedStat(enduranceStat.BreedValue, enduranceStat.CompanionOffset, enduranceStat.TackOffset, enduranceStat.MaxValue);
message += Messages.FormatHorseAdvancedStat(inteligenceStat.BreedValue, inteligenceStat.CompanionOffset, inteligenceStat.TackOffset, inteligenceStat.MaxValue);
message += Messages.FormatHorseAdvancedStat(agilityStat.BreedValue, personalityStat.CompanionOffset, personalityStat.TackOffset, personalityStat.MaxValue);
message += Messages.FormatHorseAdvancedStat(personalityStat.BreedValue, personalityStat.CompanionOffset, personalityStat.TackOffset, personalityStat.MaxValue);
message += Messages.FormatHorseBreedDetails(horse.Breed.Name, horse.Breed.Description);
message += Messages.FormatHorseHeight(Convert.ToInt32(Math.Floor(HorseInfo.CalculateHands(horse.Breed.BaseStats.MinHeight))), Convert.ToInt32(Math.Floor(HorseInfo.CalculateHands(horse.Breed.BaseStats.MaxHeight))));

View file

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HISP.Game.Services
{
public class Workshop
{
public Workshop()
{
CraftableItems = new List<CraftableItem>();
}
public class RequiredItem
{
public int RequiredItemId;
public int RequiredItemCount;
}
public class CraftableItem
{
public CraftableItem()
{
RequiredItems = new List<RequiredItem>();
}
public int Id;
public int GiveItemId;
public int MoneyCost;
public List<RequiredItem> RequiredItems;
}
public int X;
public int Y;
public List<CraftableItem> CraftableItems;
public static List<Workshop> Workshops = new List<Workshop>();
public static CraftableItem GetCraftId(int id)
{
foreach(Workshop wkShop in Workshops)
{
foreach(CraftableItem crftItem in wkShop.CraftableItems)
{
if (crftItem.Id == id)
return crftItem;
}
}
throw new KeyNotFoundException("No craft id " + id + " was found.");
}
}
}