mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-08 22:25:42 +12:00
Fixed a bug where you could ride horses without any tack.
This commit is contained in:
parent
3be40efc5e
commit
435ca1b17c
5 changed files with 11 additions and 1 deletions
|
@ -174,6 +174,7 @@
|
||||||
"basic_stat_format":"^AB%HEALTH%;%HUNGER%;%THIRST%;%MOOD%;%ENERGY%;%GROOM%;%SHOES%;",
|
"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",
|
||||||
|
"cannot_mount_tacked":"Cannot ride horse until fully tacked.",
|
||||||
"horse_timer":"You have 60 seconds to capture the horse. Good luck!",
|
"horse_timer":"You have 60 seconds to capture the horse. Good luck!",
|
||||||
"horse_escaped":"The Horse Evaded Capture.",
|
"horse_escaped":"The Horse Evaded Capture.",
|
||||||
"hore_caught":"You Captured the Horse!",
|
"hore_caught":"You Captured the Horse!",
|
||||||
|
|
|
@ -153,7 +153,7 @@ namespace HISP.Game.Horse
|
||||||
private int getOffsetFrom(Item.ItemInformation tackPeice)
|
private int getOffsetFrom(Item.ItemInformation tackPeice)
|
||||||
{
|
{
|
||||||
int offsetBy = 0;
|
int offsetBy = 0;
|
||||||
foreach (Item.Effects effect in baseHorse.Equipment.Bridle.Effects)
|
foreach (Item.Effects effect in tackPeice.Effects)
|
||||||
{
|
{
|
||||||
string effects = effect.EffectsWhat;
|
string effects = effect.EffectsWhat;
|
||||||
switch (effects)
|
switch (effects)
|
||||||
|
|
|
@ -236,6 +236,7 @@ namespace HISP.Game
|
||||||
public static string HorseTrainableInFormat;
|
public static string HorseTrainableInFormat;
|
||||||
public static string HorseIsTrainable;
|
public static string HorseIsTrainable;
|
||||||
|
|
||||||
|
public static string HorseCannotMountUntilTackedMessage;
|
||||||
public static string HorseMountButtonFormat;
|
public static string HorseMountButtonFormat;
|
||||||
public static string HorseDisMountButtonFormat;
|
public static string HorseDisMountButtonFormat;
|
||||||
public static string HorseFeedButtonFormat;
|
public static string HorseFeedButtonFormat;
|
||||||
|
|
|
@ -724,6 +724,7 @@ namespace HISP.Server
|
||||||
Messages.HorseTrainableInFormat = gameData.messages.meta.horse.horse_inventory.trainable_in;
|
Messages.HorseTrainableInFormat = gameData.messages.meta.horse.horse_inventory.trainable_in;
|
||||||
Messages.HorseIsTrainable = gameData.messages.meta.horse.horse_inventory.currently_trainable;
|
Messages.HorseIsTrainable = gameData.messages.meta.horse.horse_inventory.currently_trainable;
|
||||||
|
|
||||||
|
Messages.HorseCannotMountUntilTackedMessage = gameData.messages.meta.horse.cannot_mount_tacked;
|
||||||
Messages.HorseMountButtonFormat = gameData.messages.meta.horse.horse_inventory.mount_button;
|
Messages.HorseMountButtonFormat = gameData.messages.meta.horse.horse_inventory.mount_button;
|
||||||
Messages.HorseDisMountButtonFormat = gameData.messages.meta.horse.horse_inventory.dismount_button;
|
Messages.HorseDisMountButtonFormat = gameData.messages.meta.horse.horse_inventory.dismount_button;
|
||||||
Messages.HorseFeedButtonFormat = gameData.messages.meta.horse.horse_inventory.feed_button;
|
Messages.HorseFeedButtonFormat = gameData.messages.meta.horse.horse_inventory.feed_button;
|
||||||
|
|
|
@ -759,6 +759,13 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
HorseInstance horseInst = sender.LoggedinUser.HorseInventory.GetHorseById(randomId);
|
HorseInstance horseInst = sender.LoggedinUser.HorseInventory.GetHorseById(randomId);
|
||||||
|
|
||||||
|
if(horseInst.Equipment.Saddle == null || horseInst.Equipment.SaddlePad == null || horseInst.Equipment.Bridle == null)
|
||||||
|
{
|
||||||
|
byte[] horseNotTackedMessage = PacketBuilder.CreateChat(Messages.HorseCannotMountUntilTackedMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||||
|
sender.SendPacket(horseNotTackedMessage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
string ridingHorseMessage = Messages.FormatHorseRidingMessage(horseInst.Name);
|
string ridingHorseMessage = Messages.FormatHorseRidingMessage(horseInst.Name);
|
||||||
byte[] ridingHorseMessagePacket = PacketBuilder.CreateChat(ridingHorseMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
byte[] ridingHorseMessagePacket = PacketBuilder.CreateChat(ridingHorseMessage, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||||
sender.SendPacket(ridingHorseMessagePacket);
|
sender.SendPacket(ridingHorseMessagePacket);
|
||||||
|
|
Loading…
Add table
Reference in a new issue