Add stuff

This commit is contained in:
SilicaAndPina 2021-01-10 14:18:58 +13:00
parent 0d95534125
commit 60fbc4b3b4
6 changed files with 17 additions and 5 deletions

View file

@ -146,6 +146,7 @@
"view_basic_stats":"^T6View all of basic stats together:^D33|BASIC STATS^R1",
"view_advanced_stats":"^T6View all advanced stats together:^D34|ALL STATS^R1",
"equip_tack_message":"You put the %NAME% on %HORSENAME%.",
"riding_message":"You are now riding %HORSENAME%!",
"unequip_tack_message":"You removed the tack off %HORSENAME%.",
"horse_inventory":{
"your_horse_format":"Your horse: <B>%NAME%:</B><BR>",

View file

@ -177,7 +177,7 @@ namespace HISP.Game
public static string ViewBaiscStats;
public static string ViewAdvancedStats;
public static string HorseRidingMessageFormat;
public static string HorseNameFormat;
public static string HorseReleasedByFormat;
public static string HorseHandsHeightFormat;
@ -379,6 +379,7 @@ namespace HISP.Game
public static string ExitThisPlace;
public static string BackToMap;
public static string BackToMapHorse;
public static string LongFullLine;
public static string MetaTerminator;
@ -415,7 +416,10 @@ namespace HISP.Game
// Click
public static string NothingInterestingHere;
public static string FormatHorseRidingMessage(string name)
{
return HorseRidingMessageFormat.Replace("%HORSENAME%", name);
}
public static string FormatEquipTackMessage(string itemName, string horseName)
{
return HorseEquipTackMessageFormat.Replace("%NAME%", itemName).Replace("%HORSENAME%", horseName);

View file

@ -1183,7 +1183,7 @@ namespace HISP.Game
if (World.InSpecialTile(user.X, user.Y))
{
World.SpecialTile tile = World.GetSpecialTile(user.Y, user.Y);
World.SpecialTile tile = World.GetSpecialTile(user.X, user.Y);
if (tile.Code != null)
canRelease = false;
}
@ -1194,7 +1194,7 @@ namespace HISP.Game
message += Messages.HorseOthers;
message += buildHorseList(user);
message += Messages.BackToMap;
message += Messages.BackToMapHorse;
message += Messages.MetaTerminator;
return message;

View file

@ -45,6 +45,7 @@ namespace HISP.Player
public Inn LastVisitedInn;
public HorseInventory HorseInventory;
public HorseInstance LastViewedHorse;
public HorseInstance Riding;
public PlayerQuests Quests;
public Highscore Highscores;
public Award Awards;

View file

@ -611,7 +611,7 @@ namespace HISP.Server
Messages.ViewBaiscStats = gameData.messages.meta.horse.view_basic_stats;
Messages.ViewAdvancedStats = gameData.messages.meta.horse.view_advanced_stats;
Messages.HorseRidingMessageFormat = gameData.messages.meta.horse.riding_message;
Messages.HorseNameFormat = gameData.messages.meta.horse.horse_inventory.your_horse_format;
Messages.HorseReleasedByFormat = gameData.messages.meta.horse.horse_inventory.released_by_format;
Messages.HorseHandsHeightFormat = gameData.messages.meta.horse.horse_inventory.hands_high;
@ -804,6 +804,7 @@ namespace HISP.Server
Messages.TransportFormat = gameData.messages.meta.transport_format;
Messages.ExitThisPlace = gameData.messages.meta.exit_this_place;
Messages.BackToMap = gameData.messages.meta.back_to_map;
Messages.BackToMapHorse = gameData.messages.meta.back_to_map_horse;
Messages.LongFullLine = gameData.messages.meta.long_full_line;
Messages.MetaTerminator = gameData.messages.meta.end_of_meta;

View file

@ -271,6 +271,11 @@ namespace HISP.Server
if (sender.LoggedinUser.HorseInventory.HorseIdExist(randomId))
{
HorseInstance horseInst = sender.LoggedinUser.HorseInventory.GetHorseById(randomId);
string ridingHorseMessage = Messages.FormatHorseRidingMessage(horseInst.Name);
byte[] ridingHorseMessagePacket = PacketBuilder.CreateChat(ridingHorseMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
sender.SendPacket(ridingHorseMessagePacket);
sender.LoggedinUser.Riding = horseInst;
break;
}