Implement "View all basic" and "view all" stat options.

This commit is contained in:
SilicaAndPina 2021-01-15 19:26:46 +13:00
parent 017a869b01
commit 6012ccff8e
6 changed files with 314 additions and 158 deletions

View file

@ -134,7 +134,7 @@
"horse":{ "horse":{
"stat_format":"%BASE%;%COMPAINON%;%TACK%;%MAX%;", "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":"<B>HORSES HERE:</B><BR>", "horses_here":"<B>HORSES HERE:</B><BR>",
"wild_horse":"^I252^T6%NAME%, It's a %BREED%^B3U%RANDOMID%^R1", "wild_horse":"^I252^T6%NAME%, It's a %BREED%^B3U%RANDOMID%^R1",
"horse_timer":"You have 60 seconds to capture the horse. Good luck!", "horse_timer":"You have 60 seconds to capture the horse. Good luck!",
@ -161,6 +161,17 @@
"horse_release":"<B>Are you SURE you want to let the horse go?</B>^T2If so, click ^B3X%RANDOMID%^R6", "horse_release":"<B>Are you SURE you want to let the horse go?</B>^T2If so, click ^B3X%RANDOMID%^R6",
"cant_release_currently_riding":"You cannot release the horse you are riding!", "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.", "released_horse":"You released the horse! It now roams Horse Isle freely. It will disappear in an hour.",
"allstats":{
"all_stats_header":"<B>All of your horses' complete stats:</B>",
"horse_name_entry":"<BR><BR><B>%HORSENAME%</B>: <I>%COLOR% %BREEDNAME% %SEX% (%EXP%exp)</I><BR>",
"basic_stats_compact":"<B>He</B>:%HEALTH%% <B>Hu</B>:%HUNGER%% <B>Th</B>:%THIRST%% <B>Mo</B>:%MOOD%% <B>Ti</B>:%TIREDNESS%% <B>Gr</B>:%GROOM%% <B>Sh</B>:%SHOES%% <BR>",
"advanced_stats_compact":"<B>Sp</B>:%SPEED% <B>St</B>:%STRENGTH% <B>Co</B>:%CONFORMATION% <B>Ag</B>:%AGILITY% <B>En</B>:%ENDURANCE% <B>In</B>:%INTELIGENCE% <B>Pe</B>:%PERSONALITY% ",
"legend":"<BR><BR>LEGEND:<BR><B>He:</B>health <B>Hu:</B>hunger <B>Th:</B>thirst <B>Mo:</B>mood <B>Ti:</B>tiredness <B>Gr:</B>groom <B>Sh:</B>shoes<BR><B>Sp:</B>speed <B>St:</B>strength <B>Co:</B>conformation <B>Ag:</B>agility<BR><B>En:</B>endurance <B>In:</B>intelligence <B>Pe:</B>personality<BR>"
},
"allstats_basic":{
"all_baisc_stats":"<B>All of your horses' basic stats:</B><BR>",
"horse_entry":"^L%HORSENAME%: %COLOR% %BREEDNAME% %SEX% (%EXP%exp)^R1"
},
"companion_menu":{ "companion_menu":{
"menu_header":"<B>%HORSENAME%'s current companion:</B><BR>", "menu_header":"<B>%HORSENAME%'s current companion:</B><BR>",
"companions_avalible":"^LYou have the following companions available:^R1", "companions_avalible":"^LYou have the following companions available:^R1",
@ -179,7 +190,7 @@
"horse_neigh":"Your horse neighs a thank you!", "horse_neigh":"Your horse neighs a thank you!",
"horse_could_not_finish":"The horse could not finish it all. Some was wasted.", "horse_could_not_finish":"The horse could not finish it all. Some was wasted.",
"current_status":"<B>%HORSENAME%'s current stats:</B>", "current_status":"<B>%HORSENAME%'s current stats:</B>",
"holding_horse_feed":"<BR><B>You are currently carrying the following horse feed:</B><BR>", "holding_horse_feed":"^H<BR><B>You are currently carrying the following horse feed:</B><BR>",
"horsefeed_format":"^I%ICONID%^T3[ %COUNT% ] %NAME%^B3I%RANDOMID%^R1" "horsefeed_format":"^I%ICONID%^T3[ %COUNT% ] %NAME%^B3I%RANDOMID%^R1"
}, },
"horse_inventory":{ "horse_inventory":{

View file

@ -5,6 +5,194 @@ namespace HISP.Game.Horse
{ {
class HorseInfo 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 class AdvancedStats
{ {
public AdvancedStats(HorseInstance horse, int newSpeed,int newStrength, int newConformation, int newAgility, int newInteligence, int newEndurance, int newPersonality, int newHeight) 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; Height = newHeight;
} }
public int Speed public int Speed
{ {
get get

View file

@ -236,6 +236,18 @@ namespace HISP.Game
public static string HorseReleasedMeta; public static string HorseReleasedMeta;
public static string HorseReleasedBy; 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 // Horse compainion menu
public static string HorseCompanionMenuHeaderFormat; public static string HorseCompanionMenuHeaderFormat;
public static string HorseCompnaionMenuCurrentCompanionFormat; public static string HorseCompnaionMenuCurrentCompanionFormat;
@ -452,6 +464,31 @@ namespace HISP.Game
// Click // Click
public static string NothingInterestingHere; 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) public static string FormatHorseReleasedBy(string username)
{ {
return HorseReleasedBy.Replace("%USERNAME%", username); return HorseReleasedBy.Replace("%USERNAME%", username);

View file

@ -984,7 +984,7 @@ namespace HISP.Game
{ {
string message = ""; string message = "";
message += Messages.FormatHorseCurrentStatus(horse.Name); 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; message += Messages.HorseHoldingHorseFeed;
foreach(InventoryItem item in user.Inventory.GetItemList()) foreach(InventoryItem item in user.Inventory.GetItemList())
{ {
@ -1034,6 +1034,19 @@ namespace HISP.Game
message += Messages.BackToHorse; message += Messages.BackToHorse;
return message; 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) public static string BuildHorseDescriptionEditMeta(HorseInstance horse)
{ {
string message = Messages.FormatDescriptionEditMeta(horse.Name, horse.Description); string message = Messages.FormatDescriptionEditMeta(horse.Name, horse.Description);
@ -1083,7 +1096,7 @@ namespace HISP.Game
message += Messages.HorseStats; message += Messages.HorseStats;
// What is energy? // 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; message += Messages.HorseTacked;
if (horse.Equipment.Saddle != null) if (horse.Equipment.Saddle != null)
@ -1102,161 +1115,21 @@ namespace HISP.Game
message += Messages.FormatHorseAdvancedStats(horse.Spoiled, horse.MagicUsed); message += Messages.FormatHorseAdvancedStats(horse.Spoiled, horse.MagicUsed);
int CompanionBoostAgility = 0; HorseInfo.StatCalculator speedStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.SPEED);
int CompanionBoostConformation = 0; HorseInfo.StatCalculator strengthStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.STRENGTH);
int CompanionBoostEndurance = 0; HorseInfo.StatCalculator conformationStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.CONFORMATION);
int CompanionBoostPersonality = 0; HorseInfo.StatCalculator agilityStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.AGILITY);
int CompanionBoostSpeed = 0; HorseInfo.StatCalculator enduranceStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.ENDURANCE);
int CompanionBoostStrength = 0; HorseInfo.StatCalculator inteligenceStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.INTELIGENCE);
int CompanionBoostInteligence = 0; HorseInfo.StatCalculator personalityStat = new HorseInfo.StatCalculator(horse, HorseInfo.StatType.PERSONALITY);
int TackBoostAgility = 0; message += Messages.FormatHorseAdvancedStat(speedStat.BreedValue, speedStat.CompanionOffset, speedStat.TackOffset, speedStat.MaxValue);
int TackBoostConformation = 0; message += Messages.FormatHorseAdvancedStat(strengthStat.BreedValue, strengthStat.CompanionOffset, strengthStat.TackOffset, strengthStat.MaxValue);
int TackBoostEndurance = 0; message += Messages.FormatHorseAdvancedStat(conformationStat.BreedValue, conformationStat.CompanionOffset, conformationStat.TackOffset, conformationStat.MaxValue);
int TackBoostPersonality = 0; message += Messages.FormatHorseAdvancedStat(agilityStat.BreedValue, agilityStat.CompanionOffset, agilityStat.TackOffset, agilityStat.MaxValue);
int TackBoostSpeed = 0; message += Messages.FormatHorseAdvancedStat(enduranceStat.BreedValue, enduranceStat.CompanionOffset, enduranceStat.TackOffset, enduranceStat.MaxValue);
int TackBoostStrength = 0; message += Messages.FormatHorseAdvancedStat(inteligenceStat.BreedValue, inteligenceStat.CompanionOffset, inteligenceStat.TackOffset, inteligenceStat.MaxValue);
int TackBoostInteligence = 0; message += Messages.FormatHorseAdvancedStat(agilityStat.BreedValue, personalityStat.CompanionOffset, personalityStat.TackOffset, personalityStat.MaxValue);
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.FormatHorseBreedDetails(horse.Breed.Name, horse.Breed.Description); 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)))); 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) public static string BuildTackMenu(HorseInstance horse, User user)
{ {
string message = Messages.FormatTackedAsFollowedMessage(horse.Name); string message = Messages.FormatTackedAsFollowedMessage(horse.Name);

View file

@ -674,6 +674,19 @@ namespace HISP.Server
Messages.HorseReleasedMeta = gameData.messages.meta.horse.released_horse; Messages.HorseReleasedMeta = gameData.messages.meta.horse.released_horse;
Messages.HorseReleasedBy = gameData.messages.meta.horse.released_by_message; 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 // Horse companion menu
Messages.HorseCompanionMenuHeaderFormat = gameData.messages.meta.horse.companion_menu.menu_header; Messages.HorseCompanionMenuHeaderFormat = gameData.messages.meta.horse.companion_menu.menu_header;
Messages.HorseCompnaionMenuCurrentCompanionFormat = gameData.messages.meta.horse.companion_menu.selected_companion; Messages.HorseCompnaionMenuCurrentCompanionFormat = gameData.messages.meta.horse.companion_menu.selected_companion;

View file

@ -1166,6 +1166,16 @@ namespace HISP.Server
sender.SendPacket(metaPacket); sender.SendPacket(metaPacket);
} }
break; 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 case "31": // Find Ranch
break; break;
case "9": // View Tack case "9": // View Tack