mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-10 23:25:41 +12:00
Add "View Awards" to libary.
This commit is contained in:
parent
e3dae116dd
commit
9f44620fd7
5 changed files with 37 additions and 0 deletions
DataCollection
Horse Isle Server/HorseIsleServer
|
@ -290,6 +290,10 @@
|
|||
"horse_relative_format":"^I252^T7A Horse Relative, the %NAME%:^D4c%ID%|VIEW^R1",
|
||||
"maximum_stats":"<B>MAXIMUM STATS:</B><BR>^AA",
|
||||
"breed_preview_format":"<B>Viewing %NAME%:</B><BR>%DESCRIPTION%^D4|RETURN TO BREED LIST^R2^H",
|
||||
"awards":{
|
||||
"all_earnable_awards":"^H<B>All Awards Earnable by players in Horse Isle:</B>",
|
||||
"award_entry":"^I%ICONID%^T8 %AWARDNAME% ($%BONUSMONEY% bonus)^R1^H %DESCRIPTION%"
|
||||
},
|
||||
"locations":{
|
||||
"known_islands":"^H<B>Horse Isle Known Islands</B>",
|
||||
"known_towns":"^H<B>Horse Isle Communities</B>",
|
||||
|
|
|
@ -185,6 +185,10 @@ namespace HISP.Game
|
|||
public static string MaxJewelryMessage;
|
||||
public static string RemoveJewelry;
|
||||
|
||||
// Awards (Libary)
|
||||
public static string AwardsAvalible;
|
||||
public static string AwardEntryFormat;
|
||||
|
||||
// Locations (Libary)
|
||||
public static string LocationKnownIslands;
|
||||
public static string LocationKnownTowns;
|
||||
|
@ -533,6 +537,12 @@ namespace HISP.Game
|
|||
|
||||
// Click
|
||||
public static string NothingInterestingHere;
|
||||
|
||||
public static string FormatAwardEntry(int iconId, string awardName, int bonusMoney, string description)
|
||||
{
|
||||
return AwardEntryFormat.Replace("%ICONID%", iconId.ToString()).Replace("%AWARDNAME%", awardName).Replace("%BONUSMONEY%",bonusMoney.ToString("N0")).Replace("%DESCRIPTION%",description);
|
||||
}
|
||||
|
||||
public static string FormatLocationDescription(string description)
|
||||
{
|
||||
return LocationDescriptionFormat.Replace("%AREADESC%", description);
|
||||
|
|
|
@ -446,6 +446,19 @@ namespace HISP.Game
|
|||
message += Messages.MetaTerminator;
|
||||
return message;
|
||||
}
|
||||
public static string BuildAwardsLibary()
|
||||
{
|
||||
string message = "";
|
||||
message += Messages.AwardsAvalible;
|
||||
foreach(Award.AwardEntry award in Award.GlobalAwardList.OrderBy(o => o.Sort).ToArray())
|
||||
{
|
||||
message += Messages.FormatAwardEntry(award.IconId, award.Title, award.MoneyBonus, award.Description);
|
||||
}
|
||||
message += Messages.BackToMap;
|
||||
message += Messages.MetaTerminator;
|
||||
return message;
|
||||
}
|
||||
|
||||
public static string BuildHorseReleased()
|
||||
{
|
||||
string message = "";
|
||||
|
@ -455,6 +468,7 @@ namespace HISP.Game
|
|||
return message;
|
||||
|
||||
}
|
||||
|
||||
public static string BuildTopHighscores(string gameName)
|
||||
{
|
||||
Highscore.HighscoreTableEntry[] scores = Database.GetTopScores(gameName, 20);
|
||||
|
|
|
@ -602,6 +602,10 @@ namespace HISP.Server
|
|||
Messages.StatMiscNoneRecorded = gameData.messages.meta.misc_stats.no_stats_recorded;
|
||||
Messages.StatMiscEntryFormat = gameData.messages.meta.misc_stats.stat_format;
|
||||
|
||||
// Awards (Libary)
|
||||
Messages.AwardsAvalible = gameData.messages.meta.libary.awards.all_earnable_awards;
|
||||
Messages.AwardEntryFormat = gameData.messages.meta.libary.awards.award_entry;
|
||||
|
||||
// Locations (Libary)
|
||||
Messages.LocationKnownIslands = gameData.messages.meta.libary.locations.known_islands;
|
||||
Messages.LocationKnownTowns = gameData.messages.meta.libary.locations.known_towns;
|
||||
|
|
|
@ -1309,6 +1309,11 @@ namespace HISP.Server
|
|||
metaPacket = PacketBuilder.CreateMetaPacket(Meta.BuildLocationsLibary());
|
||||
sender.SendPacket(metaPacket);
|
||||
break;
|
||||
case "23": // View Awards (Libary)
|
||||
sender.LoggedinUser.MetaPriority = true;
|
||||
metaPacket = PacketBuilder.CreateMetaPacket(Meta.BuildAwardsLibary());
|
||||
sender.SendPacket(metaPacket);
|
||||
break;
|
||||
case "24": // Award List
|
||||
sender.LoggedinUser.MetaPriority = true;
|
||||
metaPacket = PacketBuilder.CreateMetaPacket(Meta.BuildAwardList(sender.LoggedinUser));
|
||||
|
|
Loading…
Add table
Reference in a new issue