mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 21:55:42 +12:00
Fix awards and icons
This commit is contained in:
parent
f3e80cad74
commit
84250eb17e
6 changed files with 20 additions and 6 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 0f9268907fb3cd9d0da9c8ab1cba8308de0e5656
|
Subproject commit a044032daca22e2d76d54d1e5e073e6527eb43de
|
|
@ -511,6 +511,12 @@ namespace HISP.Game.Chat
|
||||||
case "PERSONALITY":
|
case "PERSONALITY":
|
||||||
instance.AdvancedStats.Personality = amount;
|
instance.AdvancedStats.Personality = amount;
|
||||||
break;
|
break;
|
||||||
|
case "HEIGHT":
|
||||||
|
instance.AdvancedStats.Height = amount;
|
||||||
|
break;
|
||||||
|
case "COLOR":
|
||||||
|
instance.Color = args[2].ToLower();
|
||||||
|
break;
|
||||||
case "EXPERIENCE":
|
case "EXPERIENCE":
|
||||||
instance.BasicStats.Experience = amount;
|
instance.BasicStats.Experience = amount;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -997,6 +997,7 @@ namespace HISP.Game
|
||||||
|
|
||||||
// Awards
|
// Awards
|
||||||
|
|
||||||
|
public static string AwardOthersFormat;
|
||||||
public static string AwardHeader;
|
public static string AwardHeader;
|
||||||
public static string NoAwards;
|
public static string NoAwards;
|
||||||
public static string AwardFormat;
|
public static string AwardFormat;
|
||||||
|
@ -2514,6 +2515,10 @@ namespace HISP.Game
|
||||||
{
|
{
|
||||||
return ConsumeItemFormat.Replace("%ITEM%", itemName);
|
return ConsumeItemFormat.Replace("%ITEM%", itemName);
|
||||||
}
|
}
|
||||||
|
public static string FormatAwardHeaderOthers(string username)
|
||||||
|
{
|
||||||
|
return AwardOthersFormat.Replace("%USERNAME%", username);
|
||||||
|
}
|
||||||
public static string FormatAwardEntry(int iconId, string title, int moneyBonus)
|
public static string FormatAwardEntry(int iconId, string title, int moneyBonus)
|
||||||
{
|
{
|
||||||
return AwardFormat.Replace("%ICON%", iconId.ToString()).Replace("%NAME%", title).Replace("%BONUS%", moneyBonus.ToString("N0", CultureInfo.InvariantCulture));
|
return AwardFormat.Replace("%ICON%", iconId.ToString()).Replace("%NAME%", title).Replace("%BONUS%", moneyBonus.ToString("N0", CultureInfo.InvariantCulture));
|
||||||
|
|
|
@ -1056,6 +1056,11 @@ namespace HISP.Game
|
||||||
message += Messages.FormatOtherHorsesMeta(pronoun);
|
message += Messages.FormatOtherHorsesMeta(pronoun);
|
||||||
|
|
||||||
message += buildHorseList(user, false);
|
message += buildHorseList(user, false);
|
||||||
|
|
||||||
|
message += Messages.FormatAwardHeaderOthers(user.Username);
|
||||||
|
foreach (Award.AwardEntry award in user.Awards.AwardsEarned)
|
||||||
|
message += Messages.FormatAwardEntry(award.IconId, award.Title, award.MoneyBonus);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1089,9 +1094,6 @@ namespace HISP.Game
|
||||||
foreach (Award.AwardEntry award in user.Awards.AwardsEarned)
|
foreach (Award.AwardEntry award in user.Awards.AwardsEarned)
|
||||||
message += Messages.FormatAwardEntry(award.IconId, award.Title, award.MoneyBonus);
|
message += Messages.FormatAwardEntry(award.IconId, award.Title, award.MoneyBonus);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
message += Messages.BackToMap;
|
message += Messages.BackToMap;
|
||||||
message += Messages.MetaTerminator;
|
message += Messages.MetaTerminator;
|
||||||
return message;
|
return message;
|
||||||
|
|
|
@ -525,12 +525,12 @@ namespace HISP.Player
|
||||||
icon = Messages.NewUserIcon;
|
icon = Messages.NewUserIcon;
|
||||||
if (Subscribed)
|
if (Subscribed)
|
||||||
{
|
{
|
||||||
int months = (DateTime.UtcNow.Month - SubscribedUntil.Month) + 12 * (DateTime.UtcNow.Year - SubscribedUntil.Year);
|
int months = (SubscribedUntil.Month - DateTime.UtcNow.Month) + ((SubscribedUntil.Year - DateTime.UtcNow.Year) * 12);
|
||||||
if (months <= 1)
|
if (months <= 1)
|
||||||
icon = Messages.MonthSubscriptionIcon;
|
icon = Messages.MonthSubscriptionIcon;
|
||||||
else if (months <= 3)
|
else if (months <= 3)
|
||||||
icon = Messages.ThreeMonthSubscripitionIcon;
|
icon = Messages.ThreeMonthSubscripitionIcon;
|
||||||
else
|
else if(months <= (12+3))
|
||||||
icon = Messages.YearSubscriptionIcon;
|
icon = Messages.YearSubscriptionIcon;
|
||||||
}
|
}
|
||||||
if (Moderator)
|
if (Moderator)
|
||||||
|
|
|
@ -2042,6 +2042,7 @@ namespace HISP.Server
|
||||||
// Awards
|
// Awards
|
||||||
|
|
||||||
Messages.AwardHeader = gameData.messages.meta.awards_page.awards_header;
|
Messages.AwardHeader = gameData.messages.meta.awards_page.awards_header;
|
||||||
|
Messages.AwardOthersFormat = gameData.messages.meta.awards_page.awards_head;
|
||||||
Messages.NoAwards = gameData.messages.meta.awards_page.no_awards;
|
Messages.NoAwards = gameData.messages.meta.awards_page.no_awards;
|
||||||
Messages.AwardFormat = gameData.messages.meta.awards_page.award_format;
|
Messages.AwardFormat = gameData.messages.meta.awards_page.award_format;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue