mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 13:45: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;
|
entry.EnteredHorse.BasicStats.Shoes -= 100;
|
||||||
message = Messages.ArenaJumpingStartup;
|
message = Messages.ArenaJumpingStartup;
|
||||||
break;
|
break;
|
||||||
case "DRESSAGE":
|
case "CONFORMATION":
|
||||||
entry.EnteredHorse.BasicStats.Mood -= 300;
|
entry.EnteredHorse.BasicStats.Mood -= 300;
|
||||||
entry.EnteredHorse.BasicStats.Tiredness -= 200;
|
entry.EnteredHorse.BasicStats.Tiredness -= 200;
|
||||||
message = Messages.ArenaConformationStartup;
|
message = Messages.ArenaConformationStartup;
|
||||||
break;
|
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[] startingUpEventPacket = PacketBuilder.CreateChat(message, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||||
byte[] swfModulePacket = PacketBuilder.CreateSwfModulePacket(swf, PacketBuilder.PACKET_SWF_CUTSCENE);
|
byte[] swfModulePacket = PacketBuilder.CreateSwfModulePacket(swf, PacketBuilder.PACKET_SWF_CUTSCENE);
|
||||||
|
|
|
@ -65,6 +65,7 @@ namespace HISP.Game
|
||||||
// Auto Sell
|
// Auto Sell
|
||||||
public static string AutoSellNotStandingInSamePlace;
|
public static string AutoSellNotStandingInSamePlace;
|
||||||
public static string AutoSellSuccessFormat;
|
public static string AutoSellSuccessFormat;
|
||||||
|
public static string HorseAutoSellValueTooHigh;
|
||||||
public static string AutoSellInsufficentFunds;
|
public static string AutoSellInsufficentFunds;
|
||||||
public static string AutoSellTooManyHorses;
|
public static string AutoSellTooManyHorses;
|
||||||
public static string AutoSellYouSoldHorseFormat;
|
public static string AutoSellYouSoldHorseFormat;
|
||||||
|
|
|
@ -933,7 +933,7 @@ namespace HISP.Server
|
||||||
Messages.AutoSellTooManyHorses = gameData.messages.meta.auto_sell.toomany_horses;
|
Messages.AutoSellTooManyHorses = gameData.messages.meta.auto_sell.toomany_horses;
|
||||||
Messages.AutoSellYouSoldHorseFormat = gameData.messages.meta.auto_sell.you_sold;
|
Messages.AutoSellYouSoldHorseFormat = gameData.messages.meta.auto_sell.you_sold;
|
||||||
Messages.AutoSellYouSoldHorseOfflineFormat = gameData.messages.meta.auto_sell.sold_offline;
|
Messages.AutoSellYouSoldHorseOfflineFormat = gameData.messages.meta.auto_sell.sold_offline;
|
||||||
|
|
||||||
// Mute Command
|
// Mute Command
|
||||||
Messages.NowMutingPlayerFormat = gameData.messages.meta.mute_command.now_ignoring_player;
|
Messages.NowMutingPlayerFormat = gameData.messages.meta.mute_command.now_ignoring_player;
|
||||||
Messages.StoppedMutingPlayerFormat = gameData.messages.meta.mute_command.stop_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.HorseAutoSellMenuFormat = gameData.messages.meta.horse.auto_sell.auto_sell_meta;
|
||||||
Messages.HorseIsAutoSell = gameData.messages.meta.horse.auto_sell.is_auto_sell;
|
Messages.HorseIsAutoSell = gameData.messages.meta.horse.auto_sell.is_auto_sell;
|
||||||
Messages.HorseAutoSellConfirmedFormat = gameData.messages.meta.horse.auto_sell.auto_sell_confirmed;
|
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.HorseAutoSellRemoved = gameData.messages.meta.horse.auto_sell.auto_sell_remove;
|
||||||
|
|
||||||
Messages.HorseSetAutoSell = gameData.messages.meta.horse.horse_inventory.set_auto_sell;
|
Messages.HorseSetAutoSell = gameData.messages.meta.horse.horse_inventory.set_auto_sell;
|
||||||
|
|
|
@ -2575,12 +2575,18 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
newSellPrice = int.Parse(dynamicInput[1]);
|
newSellPrice = int.Parse(dynamicInput[1]);
|
||||||
}
|
}
|
||||||
catch (FormatException)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " tried to set sell price to non int value.");
|
goto tooHigh;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(newSellPrice > 500000000)
|
||||||
|
{
|
||||||
|
tooHigh:;
|
||||||
|
priceTooHigh = PacketBuilder.CreateChat(Messages.HorseAutoSellValueTooHigh, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||||
|
sender.SendPacket(priceTooHigh);
|
||||||
|
break;
|
||||||
|
}
|
||||||
byte[] sellPricePacket;
|
byte[] sellPricePacket;
|
||||||
if (newSellPrice > 0)
|
if (newSellPrice > 0)
|
||||||
sellPricePacket = PacketBuilder.CreateChat(Messages.FormatAutoSellConfirmedMessage(newSellPrice), PacketBuilder.CHAT_BOTTOM_RIGHT);
|
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