mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 13:15:42 +12:00
Fix auto sell crash
This commit is contained in:
parent
f61811d1b7
commit
fdc02d5952
6 changed files with 18 additions and 7 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 4dbc6f87116dc0ec357f8b2283ab8226b0dfbdcf
|
||||
Subproject commit eed8fcbfbb36646528e53e22873a50e196c16d60
|
|
@ -191,11 +191,14 @@ namespace HISP.Game
|
|||
entry.EnteredHorse.BasicStats.Shoes -= 100;
|
||||
message = Messages.ArenaJumpingStartup;
|
||||
break;
|
||||
case "DRESSAGE":
|
||||
case "CONFORMATION":
|
||||
entry.EnteredHorse.BasicStats.Mood -= 300;
|
||||
entry.EnteredHorse.BasicStats.Tiredness -= 200;
|
||||
message = Messages.ArenaConformationStartup;
|
||||
break;
|
||||
default:
|
||||
message = "<B>Arena Type not recognized.</B><BR>Why dont you stop asking questions and get to fucking beating the competition.";
|
||||
break;
|
||||
}
|
||||
byte[] startingUpEventPacket = PacketBuilder.CreateChat(message, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
byte[] swfModulePacket = PacketBuilder.CreateSwfModulePacket(swf, PacketBuilder.PACKET_SWF_CUTSCENE);
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace HISP.Game
|
|||
// Auto Sell
|
||||
public static string AutoSellNotStandingInSamePlace;
|
||||
public static string AutoSellSuccessFormat;
|
||||
public static string HorseAutoSellValueTooHigh;
|
||||
public static string AutoSellInsufficentFunds;
|
||||
public static string AutoSellTooManyHorses;
|
||||
public static string AutoSellYouSoldHorseFormat;
|
||||
|
|
|
@ -933,7 +933,7 @@ namespace HISP.Server
|
|||
Messages.AutoSellTooManyHorses = gameData.messages.meta.auto_sell.toomany_horses;
|
||||
Messages.AutoSellYouSoldHorseFormat = gameData.messages.meta.auto_sell.you_sold;
|
||||
Messages.AutoSellYouSoldHorseOfflineFormat = gameData.messages.meta.auto_sell.sold_offline;
|
||||
|
||||
|
||||
// Mute Command
|
||||
Messages.NowMutingPlayerFormat = gameData.messages.meta.mute_command.now_ignoring_player;
|
||||
Messages.StoppedMutingPlayerFormat = gameData.messages.meta.mute_command.stop_ignoring_player;
|
||||
|
@ -1760,6 +1760,7 @@ namespace HISP.Server
|
|||
Messages.HorseAutoSellMenuFormat = gameData.messages.meta.horse.auto_sell.auto_sell_meta;
|
||||
Messages.HorseIsAutoSell = gameData.messages.meta.horse.auto_sell.is_auto_sell;
|
||||
Messages.HorseAutoSellConfirmedFormat = gameData.messages.meta.horse.auto_sell.auto_sell_confirmed;
|
||||
Messages.HorseAutoSellValueTooHigh = gameData.messages.meta.horse.auto_sell.auto_sell_to_high;
|
||||
Messages.HorseAutoSellRemoved = gameData.messages.meta.horse.auto_sell.auto_sell_remove;
|
||||
|
||||
Messages.HorseSetAutoSell = gameData.messages.meta.horse.horse_inventory.set_auto_sell;
|
||||
|
|
|
@ -2575,12 +2575,18 @@ namespace HISP.Server
|
|||
{
|
||||
newSellPrice = int.Parse(dynamicInput[1]);
|
||||
}
|
||||
catch (FormatException)
|
||||
catch (Exception)
|
||||
{
|
||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " tried to set sell price to non int value.");
|
||||
break;
|
||||
goto tooHigh;
|
||||
}
|
||||
|
||||
if(newSellPrice > 500000000)
|
||||
{
|
||||
tooHigh:;
|
||||
priceTooHigh = PacketBuilder.CreateChat(Messages.HorseAutoSellValueTooHigh, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
sender.SendPacket(priceTooHigh);
|
||||
break;
|
||||
}
|
||||
byte[] sellPricePacket;
|
||||
if (newSellPrice > 0)
|
||||
sellPricePacket = PacketBuilder.CreateChat(Messages.FormatAutoSellConfirmedMessage(newSellPrice), PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ed3ee67204a391ed0f8c43b681af64e7f7b2883f
|
||||
Subproject commit 57f27920918e9333354f7de1a3feec2dbb1dcc51
|
Loading…
Add table
Reference in a new issue