From 6012ccff8ebaa88a4cc729ac1cac1c6d289452a9 Mon Sep 17 00:00:00 2001 From: SilicaAndPina Date: Fri, 15 Jan 2021 19:26:46 +1300 Subject: [PATCH] Implement "View all basic" and "view all" stat options. --- DataCollection/gamedata.json | 15 +- .../Horse Isle Server/Game/Horse/HorseInfo.cs | 189 ++++++++++++++++ .../Horse Isle Server/Game/Messages.cs | 37 ++++ .../Horse Isle Server/Game/Meta.cs | 208 +++++------------- .../Horse Isle Server/Server/GameDataJson.cs | 13 ++ .../Horse Isle Server/Server/GameServer.cs | 10 + 6 files changed, 314 insertions(+), 158 deletions(-) diff --git a/DataCollection/gamedata.json b/DataCollection/gamedata.json index ca676d8..76ae97a 100644 --- a/DataCollection/gamedata.json +++ b/DataCollection/gamedata.json @@ -134,7 +134,7 @@ "horse":{ "stat_format":"%BASE%;%COMPAINON%;%TACK%;%MAX%;", - "basic_stat_format":"^AB%HEALTH%;%HUNGER%;%THIRST%;%MOOD%;%ENERGY%;%GROOM%;%SHOES%;^H", + "basic_stat_format":"^AB%HEALTH%;%HUNGER%;%THIRST%;%MOOD%;%ENERGY%;%GROOM%;%SHOES%;", "horses_here":"HORSES HERE:
", "wild_horse":"^I252^T6%NAME%, It's a %BREED%^B3U%RANDOMID%^R1", "horse_timer":"You have 60 seconds to capture the horse. Good luck!", @@ -161,6 +161,17 @@ "horse_release":"Are you SURE you want to let the horse go?^T2If so, click ^B3X%RANDOMID%^R6", "cant_release_currently_riding":"You cannot release the horse you are riding!", "released_horse":"You released the horse! It now roams Horse Isle freely. It will disappear in an hour.", + "allstats":{ + "all_stats_header":"All of your horses' complete stats:", + "horse_name_entry":"

%HORSENAME%: %COLOR% %BREEDNAME% %SEX% (%EXP%exp)
", + "basic_stats_compact":"He:%HEALTH%% Hu:%HUNGER%% Th:%THIRST%% Mo:%MOOD%% Ti:%TIREDNESS%% Gr:%GROOM%% Sh:%SHOES%%
", + "advanced_stats_compact":"Sp:%SPEED% St:%STRENGTH% Co:%CONFORMATION% Ag:%AGILITY% En:%ENDURANCE% In:%INTELIGENCE% Pe:%PERSONALITY% ", + "legend":"

LEGEND:
He:health Hu:hunger Th:thirst Mo:mood Ti:tiredness Gr:groom Sh:shoes
Sp:speed St:strength Co:conformation Ag:agility
En:endurance In:intelligence Pe:personality
" + }, + "allstats_basic":{ + "all_baisc_stats":"All of your horses' basic stats:
", + "horse_entry":"^L%HORSENAME%: %COLOR% %BREEDNAME% %SEX% (%EXP%exp)^R1" + }, "companion_menu":{ "menu_header":"%HORSENAME%'s current companion:
", "companions_avalible":"^LYou have the following companions available:^R1", @@ -179,7 +190,7 @@ "horse_neigh":"Your horse neighs a thank you!", "horse_could_not_finish":"The horse could not finish it all. Some was wasted.", "current_status":"%HORSENAME%'s current stats:", - "holding_horse_feed":"
You are currently carrying the following horse feed:
", + "holding_horse_feed":"^H
You are currently carrying the following horse feed:
", "horsefeed_format":"^I%ICONID%^T3[ %COUNT% ] %NAME%^B3I%RANDOMID%^R1" }, "horse_inventory":{ diff --git a/Horse Isle Server/Horse Isle Server/Game/Horse/HorseInfo.cs b/Horse Isle Server/Horse Isle Server/Game/Horse/HorseInfo.cs index 8cfbf34..bbbc6f0 100644 --- a/Horse Isle Server/Horse Isle Server/Game/Horse/HorseInfo.cs +++ b/Horse Isle Server/Horse Isle Server/Game/Horse/HorseInfo.cs @@ -5,6 +5,194 @@ namespace HISP.Game.Horse { class HorseInfo { + public enum StatType + { + AGILITY, + CONFORMATION, + ENDURANCE, + PERSONALITY, + SPEED, + STRENGTH, + INTELIGENCE + } + public class StatCalculator + { + public StatCalculator(HorseInstance horse, StatType type) + { + baseHorse = horse; + horseStat = type; + } + private StatType horseStat; + private HorseInstance baseHorse; + + public int BaseValue + { + get + { + switch (horseStat) + { + case StatType.AGILITY: + return baseHorse.Breed.BaseStats.Agility; + case StatType.CONFORMATION: + return baseHorse.Breed.BaseStats.Conformation; + case StatType.ENDURANCE: + return baseHorse.Breed.BaseStats.Endurance; + case StatType.PERSONALITY: + return baseHorse.Breed.BaseStats.Personality; + case StatType.SPEED: + return baseHorse.Breed.BaseStats.Speed; + case StatType.STRENGTH: + return baseHorse.Breed.BaseStats.Strength; + case StatType.INTELIGENCE: + return baseHorse.Breed.BaseStats.Inteligence; + default: + return 0; + } + } + } + public int MaxValue + { + get + { + return BaseValue * 2; + } + } + public int BreedValue + { + get + { + return BaseValue + BreedOffset; + } + } + public int BreedOffset + { + get + { + switch (horseStat) + { + case StatType.AGILITY: + return baseHorse.AdvancedStats.Agility; + case StatType.CONFORMATION: + return baseHorse.AdvancedStats.Conformation; + case StatType.ENDURANCE: + return baseHorse.AdvancedStats.Endurance; + case StatType.PERSONALITY: + return baseHorse.AdvancedStats.Personality; + case StatType.SPEED: + return baseHorse.AdvancedStats.Speed; + case StatType.STRENGTH: + return baseHorse.AdvancedStats.Strength; + case StatType.INTELIGENCE: + return baseHorse.AdvancedStats.Inteligence; + default: + return 0; + } + } + set + { + switch (horseStat) + { + case StatType.AGILITY: + baseHorse.AdvancedStats.Agility = value; + break; + case StatType.CONFORMATION: + baseHorse.AdvancedStats.Conformation = value; + break; + case StatType.ENDURANCE: + baseHorse.AdvancedStats.Endurance = value; + break; + case StatType.PERSONALITY: + baseHorse.AdvancedStats.Personality = value; + break; + case StatType.SPEED: + baseHorse.AdvancedStats.Speed = value; + break; + case StatType.STRENGTH: + baseHorse.AdvancedStats.Strength = value; + break; + case StatType.INTELIGENCE: + baseHorse.AdvancedStats.Inteligence = value; + break; + } + } + } + public int CompanionOffset + { + get + { + int offsetBy = 0; + if (baseHorse.Equipment.Companion != null) + offsetBy += getOffetFrom(baseHorse.Equipment.Companion); + return offsetBy; + } + } + public int TackOffset + { + get + { + int offsetBy = 0; + if (baseHorse.Equipment.Saddle != null) + offsetBy += getOffetFrom(baseHorse.Equipment.Saddle); + if (baseHorse.Equipment.SaddlePad != null) + offsetBy += getOffetFrom(baseHorse.Equipment.SaddlePad); + if (baseHorse.Equipment.Bridle != null) + offsetBy += getOffetFrom(baseHorse.Equipment.Bridle); + return offsetBy; + } + } + public int Total + { + get + { + return BreedValue + CompanionOffset + TackOffset; + } + } + + private int getOffetFrom(Item.ItemInformation tackPeice) + { + int offsetBy = 0; + foreach (Item.Effects effect in baseHorse.Equipment.Bridle.Effects) + { + string effects = effect.EffectsWhat; + switch (effects) + { + case "AGILITYOFFSET": + if (horseStat == StatType.AGILITY) + offsetBy += effect.EffectAmount; + break; + case "CONFORMATIONOFFSET": + if (horseStat == StatType.CONFORMATION) + offsetBy += effect.EffectAmount; + break; + case "ENDURANCEOFFSET": + if (horseStat == StatType.ENDURANCE) + offsetBy += effect.EffectAmount; + break; + case "PERSONALITYOFFSET": + if (horseStat == StatType.PERSONALITY) + offsetBy += effect.EffectAmount; + break; + case "SPEEDOFFSET": + if (horseStat == StatType.SPEED) + offsetBy += effect.EffectAmount; + break; + case "STRENGTHOFFSET": + if (horseStat == StatType.STRENGTH) + offsetBy += effect.EffectAmount; + break; + case "INTELLIGENCEOFFSET": + if (horseStat == StatType.INTELIGENCE) + offsetBy += effect.EffectAmount; + break; + + } + + } + return offsetBy; + } + + } + public class AdvancedStats { public AdvancedStats(HorseInstance horse, int newSpeed,int newStrength, int newConformation, int newAgility, int newInteligence, int newEndurance, int newPersonality, int newHeight) @@ -21,6 +209,7 @@ namespace HISP.Game.Horse Height = newHeight; } + public int Speed { get diff --git a/Horse Isle Server/Horse Isle Server/Game/Messages.cs b/Horse Isle Server/Horse Isle Server/Game/Messages.cs index 45926e8..81be76f 100644 --- a/Horse Isle Server/Horse Isle Server/Game/Messages.cs +++ b/Horse Isle Server/Horse Isle Server/Game/Messages.cs @@ -236,6 +236,18 @@ namespace HISP.Game public static string HorseReleasedMeta; public static string HorseReleasedBy; + // All Stats (basic) + public static string HorseAllBasicStats; + public static string HorseBasicStatEntryFormat; + + // All Stats (all) + + public static string HorseAllStatsHeader; + public static string HorseNameEntryFormat; + public static string HorseBasicStatsCompactedFormat; + public static string HorseAdvancedStatsCompactedFormat; + public static string HorseAllStatsLegend; + // Horse compainion menu public static string HorseCompanionMenuHeaderFormat; public static string HorseCompnaionMenuCurrentCompanionFormat; @@ -452,6 +464,31 @@ namespace HISP.Game // Click public static string NothingInterestingHere; + + public static string FormatCompactedAdvancedStats(int speed, int strength, int conformation, int agility, int endurance, int inteligence, int personality) + { + return HorseAdvancedStatsCompactedFormat.Replace("%SPEED%", speed.ToString()).Replace("%STRENGTH%", strength.ToString()).Replace("%CONFORMATION%",conformation.ToString()).Replace("%AGILITY%", agility.ToString()).Replace("%ENDURANCE%", endurance.ToString()).Replace("%INTELIGENCE%", inteligence.ToString()).Replace("%PERSONALITY%", personality.ToString()); + } + public static string FormatCompactedBasicStats(int health, int hunger, int thirst, int mood, int tiredness, int groom, int shoes) + { + int healthPercentage = Convert.ToInt32(Math.Floor((((double)health / 1000.0) * 100.0))); + int hungerPercentage = Convert.ToInt32(Math.Floor((((double)hunger / 1000.0) * 100.0))); + int thirstPercentage = Convert.ToInt32(Math.Floor((((double)thirst / 1000.0) * 100.0))); + int moodPercentage = Convert.ToInt32(Math.Floor((((double)mood / 1000.0) * 100.0))); + int tirednessPercentage = Convert.ToInt32(Math.Floor((((double)tiredness / 1000.0) * 100.0))); + int groomPercentage = Convert.ToInt32(Math.Floor((((double)groom / 1000.0) * 100.0))); + int shoesPercentage = Convert.ToInt32(Math.Floor((((double)shoes / 1000.0) * 100.0))); + + return HorseBasicStatsCompactedFormat.Replace("%HEALTH%", healthPercentage.ToString()).Replace("%HUNGER%", hungerPercentage.ToString()).Replace("%THIRST%", thirstPercentage.ToString()).Replace("%MOOD%", moodPercentage.ToString()).Replace("%TIREDNESS%", tirednessPercentage.ToString()).Replace("%GROOM%", groomPercentage.ToString()).Replace("%SHOES%", shoesPercentage.ToString()); + } + public static string FormatAllStatsEntry(string horseName, string color, string breedName, string sex, int exp) + { + return HorseNameEntryFormat.Replace("%HORSENAME%", horseName).Replace("%COLOR%", color).Replace("%BREEDNAME%", breedName).Replace("%SEX%", sex).Replace("%EXP%", exp.ToString("N0")); + } + public static string FormaHorseAllBasicStatsEntry(string horseName, string color, string breedName, string sex, int exp) + { + return HorseBasicStatEntryFormat.Replace("%HORSENAME%", horseName).Replace("%COLOR%", color).Replace("%BREEDNAME%", breedName).Replace("%SEX%", sex).Replace("%EXP%", exp.ToString("N0")); + } public static string FormatHorseReleasedBy(string username) { return HorseReleasedBy.Replace("%USERNAME%", username); diff --git a/Horse Isle Server/Horse Isle Server/Game/Meta.cs b/Horse Isle Server/Horse Isle Server/Game/Meta.cs index 547b04d..ba0870c 100644 --- a/Horse Isle Server/Horse Isle Server/Game/Meta.cs +++ b/Horse Isle Server/Horse Isle Server/Game/Meta.cs @@ -984,7 +984,7 @@ namespace HISP.Game { string message = ""; message += Messages.FormatHorseCurrentStatus(horse.Name); - message += Messages.FormatHorseBasicStat(horse.BasicStats.Health, horse.BasicStats.Hunger, horse.BasicStats.Thirst, horse.BasicStats.Mood, horse.BasicStats.Tiredness, horse.BasicStats.Groom, horse.BasicStats.Groom); + message += Messages.FormatHorseBasicStat(horse.BasicStats.Health, horse.BasicStats.Hunger, horse.BasicStats.Thirst, horse.BasicStats.Mood, horse.BasicStats.Tiredness, horse.BasicStats.Groom, horse.BasicStats.Shoes); message += Messages.HorseHoldingHorseFeed; foreach(InventoryItem item in user.Inventory.GetItemList()) { @@ -1034,6 +1034,19 @@ namespace HISP.Game message += Messages.BackToHorse; return message; } + + public static string BuildAllBasicStats(User user) + { + string message = Messages.HorseAllBasicStats; + foreach(HorseInstance horse in user.HorseInventory.HorseList) + { + message += Messages.FormaHorseAllBasicStatsEntry(horse.Name, horse.Color, horse.Breed.Name, horse.Sex, horse.BasicStats.Experience); + message += Messages.FormatHorseBasicStat(horse.BasicStats.Health, horse.BasicStats.Hunger, horse.BasicStats.Thirst, horse.BasicStats.Mood, horse.BasicStats.Tiredness, horse.BasicStats.Groom, horse.BasicStats.Shoes); + } + message += Messages.BackToMap; + message += Messages.MetaTerminator; + return message; + } public static string BuildHorseDescriptionEditMeta(HorseInstance horse) { string message = Messages.FormatDescriptionEditMeta(horse.Name, horse.Description); @@ -1083,7 +1096,7 @@ namespace HISP.Game message += Messages.HorseStats; // What is energy? - message += Messages.FormatHorseBasicStat(horse.BasicStats.Health, horse.BasicStats.Hunger, horse.BasicStats.Thirst, horse.BasicStats.Mood, horse.BasicStats.Tiredness, horse.BasicStats.Groom, horse.BasicStats.Groom); + message += Messages.FormatHorseBasicStat(horse.BasicStats.Health, horse.BasicStats.Hunger, horse.BasicStats.Thirst, horse.BasicStats.Mood, horse.BasicStats.Tiredness, horse.BasicStats.Groom, horse.BasicStats.Shoes); message += Messages.HorseTacked; if (horse.Equipment.Saddle != null) @@ -1102,161 +1115,21 @@ namespace HISP.Game message += Messages.FormatHorseAdvancedStats(horse.Spoiled, horse.MagicUsed); - int CompanionBoostAgility = 0; - int CompanionBoostConformation = 0; - int CompanionBoostEndurance = 0; - int CompanionBoostPersonality = 0; - int CompanionBoostSpeed = 0; - int CompanionBoostStrength = 0; - int CompanionBoostInteligence = 0; + HorseInfo.StatCalculator speedStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.SPEED); + HorseInfo.StatCalculator strengthStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.STRENGTH); + HorseInfo.StatCalculator conformationStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.CONFORMATION); + HorseInfo.StatCalculator agilityStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.AGILITY); + HorseInfo.StatCalculator enduranceStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.ENDURANCE); + HorseInfo.StatCalculator inteligenceStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.INTELIGENCE); + HorseInfo.StatCalculator personalityStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.PERSONALITY); - int TackBoostAgility = 0; - int TackBoostConformation = 0; - int TackBoostEndurance = 0; - int TackBoostPersonality = 0; - int TackBoostSpeed = 0; - int TackBoostStrength = 0; - int TackBoostInteligence = 0; - - if(horse.Equipment.Saddle != null) - { - foreach (Item.Effects effect in horse.Equipment.Saddle.Effects) - { - string effects = effect.EffectsWhat; - switch (effects) - { - case "AGILITY": - TackBoostAgility += effect.EffectAmount; - break; - case "CONFORMATION": - TackBoostConformation += effect.EffectAmount; - break; - case "ENDURANCE": - TackBoostEndurance += effect.EffectAmount; - break; - case "PERSONALITY": - TackBoostPersonality += effect.EffectAmount; - break; - case "SPEED": - TackBoostSpeed += effect.EffectAmount; - break; - case "STRENGTH": - TackBoostStrength += effect.EffectAmount; - break; - case "INTELLIGENCEOFFSET": - TackBoostInteligence += effect.EffectAmount; - break; - - } - - } - } - if (horse.Equipment.SaddlePad != null) - { - foreach (Item.Effects effect in horse.Equipment.SaddlePad.Effects) - { - string effects = effect.EffectsWhat; - switch (effects) - { - case "AGILITY": - TackBoostAgility += effect.EffectAmount; - break; - case "CONFORMATION": - TackBoostConformation += effect.EffectAmount; - break; - case "ENDURANCE": - TackBoostEndurance += effect.EffectAmount; - break; - case "PERSONALITY": - TackBoostPersonality += effect.EffectAmount; - break; - case "SPEED": - TackBoostSpeed += effect.EffectAmount; - break; - case "STRENGTH": - TackBoostStrength += effect.EffectAmount; - break; - case "INTELLIGENCEOFFSET": - TackBoostInteligence += effect.EffectAmount; - break; - } - - } - } - if (horse.Equipment.Bridle != null) - { - foreach (Item.Effects effect in horse.Equipment.Bridle.Effects) - { - string effects = effect.EffectsWhat; - switch (effects) - { - case "AGILITY": - TackBoostAgility += effect.EffectAmount; - break; - case "CONFORMATION": - TackBoostConformation += effect.EffectAmount; - break; - case "ENDURANCE": - TackBoostEndurance += effect.EffectAmount; - break; - case "PERSONALITY": - TackBoostPersonality += effect.EffectAmount; - break; - case "SPEED": - TackBoostSpeed += effect.EffectAmount; - break; - case "STRENGTH": - TackBoostStrength += effect.EffectAmount; - break; - case "INTELLIGENCE": - TackBoostInteligence += effect.EffectAmount; - break; - - } - - } - } - if (horse.Equipment.Companion != null) - { - foreach (Item.Effects effect in horse.Equipment.Companion.Effects) - { - string effects = effect.EffectsWhat; - switch (effects) - { - case "AGILITY": - CompanionBoostAgility += effect.EffectAmount; - break; - case "CONFORMATION": - CompanionBoostConformation += effect.EffectAmount; - break; - case "ENDURANCE": - CompanionBoostEndurance += effect.EffectAmount; - break; - case "PERSONALITY": - CompanionBoostPersonality += effect.EffectAmount; - break; - case "SPEED": - CompanionBoostSpeed += effect.EffectAmount; - break; - case "STRENGTH": - CompanionBoostStrength += effect.EffectAmount; - break; - case "INTELLIGENCE": - CompanionBoostInteligence += effect.EffectAmount; - break; - } - - } - } - - - message += Messages.FormatHorseAdvancedStat(horse.Breed.BaseStats.Speed + horse.AdvancedStats.Speed, CompanionBoostSpeed, TackBoostSpeed, horse.Breed.BaseStats.Speed * 2); - message += Messages.FormatHorseAdvancedStat(horse.Breed.BaseStats.Strength + horse.AdvancedStats.Strength, CompanionBoostStrength, TackBoostStrength, horse.Breed.BaseStats.Strength * 2); - message += Messages.FormatHorseAdvancedStat(horse.Breed.BaseStats.Conformation + horse.AdvancedStats.Conformation, CompanionBoostConformation, TackBoostConformation, horse.Breed.BaseStats.Conformation * 2); - message += Messages.FormatHorseAdvancedStat(horse.Breed.BaseStats.Agility + horse.AdvancedStats.Agility, CompanionBoostAgility, TackBoostAgility, horse.Breed.BaseStats.Agility * 2); - message += Messages.FormatHorseAdvancedStat(horse.Breed.BaseStats.Endurance + horse.AdvancedStats.Endurance, CompanionBoostInteligence, TackBoostInteligence, horse.Breed.BaseStats.Endurance * 2); - message += Messages.FormatHorseAdvancedStat(horse.Breed.BaseStats.Inteligence + horse.AdvancedStats.Inteligence, CompanionBoostInteligence, TackBoostInteligence, horse.Breed.BaseStats.Inteligence * 2); - message += Messages.FormatHorseAdvancedStat(horse.Breed.BaseStats.Personality + horse.AdvancedStats.Personality, CompanionBoostPersonality, TackBoostPersonality, horse.Breed.BaseStats.Personality * 2); + message += Messages.FormatHorseAdvancedStat(speedStat.BreedValue, speedStat.CompanionOffset, speedStat.TackOffset, speedStat.MaxValue); + message += Messages.FormatHorseAdvancedStat(strengthStat.BreedValue, strengthStat.CompanionOffset, strengthStat.TackOffset, strengthStat.MaxValue); + message += Messages.FormatHorseAdvancedStat(conformationStat.BreedValue, conformationStat.CompanionOffset, conformationStat.TackOffset, conformationStat.MaxValue); + 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.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)))); @@ -1288,6 +1161,29 @@ namespace HISP.Game } + public static string BuildAllStats(User user) + { + string message = Messages.HorseAllStatsHeader; + foreach(HorseInstance horse in user.HorseInventory.HorseList) + { + HorseInfo.StatCalculator speedStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.SPEED); + HorseInfo.StatCalculator strengthStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.STRENGTH); + HorseInfo.StatCalculator conformationStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.CONFORMATION); + HorseInfo.StatCalculator agilityStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.AGILITY); + HorseInfo.StatCalculator enduranceStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.ENDURANCE); + HorseInfo.StatCalculator inteligenceStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.INTELIGENCE); + HorseInfo.StatCalculator personalityStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.PERSONALITY); + + message += Messages.FormatAllStatsEntry(horse.Name, horse.Color, horse.Breed.Name, horse.Sex, horse.BasicStats.Experience); + message += Messages.FormatCompactedBasicStats(horse.BasicStats.Health, horse.BasicStats.Hunger, horse.BasicStats.Thirst, horse.BasicStats.Mood, horse.BasicStats.Tiredness, horse.BasicStats.Groom, horse.BasicStats.Shoes); + message += Messages.FormatCompactedAdvancedStats(speedStat.Total, strengthStat.Total, conformationStat.Total, agilityStat.Total, enduranceStat.Total, inteligenceStat.Total, personalityStat.Total); + } + message += Messages.HorseAllStatsLegend; + message += Messages.BackToMap; + message += Messages.MetaTerminator; + return message; + } + public static string BuildTackMenu(HorseInstance horse, User user) { string message = Messages.FormatTackedAsFollowedMessage(horse.Name); diff --git a/Horse Isle Server/Horse Isle Server/Server/GameDataJson.cs b/Horse Isle Server/Horse Isle Server/Server/GameDataJson.cs index 7e6f3ae..4d90d43 100644 --- a/Horse Isle Server/Horse Isle Server/Server/GameDataJson.cs +++ b/Horse Isle Server/Horse Isle Server/Server/GameDataJson.cs @@ -674,6 +674,19 @@ namespace HISP.Server Messages.HorseReleasedMeta = gameData.messages.meta.horse.released_horse; Messages.HorseReleasedBy = gameData.messages.meta.horse.released_by_message; + // All Stats (basic) + + Messages.HorseAllBasicStats = gameData.messages.meta.horse.allstats_basic.all_baisc_stats; + Messages.HorseBasicStatEntryFormat = gameData.messages.meta.horse.allstats_basic.horse_entry; + + // All Stats (all) + Messages.HorseAllStatsHeader = gameData.messages.meta.horse.allstats.all_stats_header; + Messages.HorseNameEntryFormat = gameData.messages.meta.horse.allstats.horse_name_entry; + Messages.HorseBasicStatsCompactedFormat = gameData.messages.meta.horse.allstats.basic_stats_compact; + Messages.HorseAdvancedStatsCompactedFormat = gameData.messages.meta.horse.allstats.advanced_stats_compact; + Messages.HorseAllStatsLegend = gameData.messages.meta.horse.allstats.legend; + + // Horse companion menu Messages.HorseCompanionMenuHeaderFormat = gameData.messages.meta.horse.companion_menu.menu_header; Messages.HorseCompnaionMenuCurrentCompanionFormat = gameData.messages.meta.horse.companion_menu.selected_companion; diff --git a/Horse Isle Server/Horse Isle Server/Server/GameServer.cs b/Horse Isle Server/Horse Isle Server/Server/GameServer.cs index bf02276..da2eb16 100644 --- a/Horse Isle Server/Horse Isle Server/Server/GameServer.cs +++ b/Horse Isle Server/Horse Isle Server/Server/GameServer.cs @@ -1166,6 +1166,16 @@ namespace HISP.Server sender.SendPacket(metaPacket); } break; + case "33": + sender.LoggedinUser.MetaPriority = true; + metaPacket = PacketBuilder.CreateMetaPacket(Meta.BuildAllBasicStats(sender.LoggedinUser)); + sender.SendPacket(metaPacket); + break; + case "34": + sender.LoggedinUser.MetaPriority = true; + metaPacket = PacketBuilder.CreateMetaPacket(Meta.BuildAllStats(sender.LoggedinUser)); + sender.SendPacket(metaPacket); + break; case "31": // Find Ranch break; case "9": // View Tack