mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 05:05:40 +12:00
Fix build
This commit is contained in:
parent
574596b4e0
commit
1909950409
7 changed files with 83 additions and 83 deletions
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.8.54.0")]
|
[assembly: AssemblyVersion("1.8.55.0")]
|
||||||
[assembly: AssemblyFileVersion("1.8.54.0")]
|
[assembly: AssemblyFileVersion("1.8.55.0")]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: hisp
|
Package: hisp
|
||||||
Version: 1.8.54
|
Version: 1.8.55
|
||||||
Depends: coreutils,systemd,mariadb-server,libsqlite3-dev,zlib1g-dev,libicu-dev,libkrb5-dev
|
Depends: coreutils,systemd,mariadb-server,libsqlite3-dev,zlib1g-dev,libicu-dev,libkrb5-dev
|
||||||
Maintainer: Li
|
Maintainer: Li
|
||||||
Homepage: https://islehorse.com
|
Homepage: https://islehorse.com
|
||||||
|
|
|
@ -30,8 +30,8 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.8.54.0")]
|
[assembly: AssemblyVersion("1.8.55.0")]
|
||||||
[assembly: AssemblyFileVersion("1.8.54.0")]
|
[assembly: AssemblyFileVersion("1.8.55.0")]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -532,9 +532,10 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
#if OS_DEBUG
|
#if OS_DEBUG
|
||||||
throw e;
|
throw e;
|
||||||
#endif
|
#else
|
||||||
Logger.ErrorPrint("Unhandled Exception: " + e.Message + "\n" + e.StackTrace);
|
Logger.ErrorPrint("Unhandled Exception: " + e.Message + "\n" + e.StackTrace);
|
||||||
Kick("Unhandled Exception: " + e.Message + "\n" + e.StackTrace);
|
Kick("Unhandled Exception: " + e.Message + "\n" + e.StackTrace);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,6 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
public class GameServer
|
public class GameServer
|
||||||
{
|
{
|
||||||
private const int PACKET_FOOTER_LENGTH;
|
|
||||||
|
|
||||||
public static Socket ServerSocket;
|
public static Socket ServerSocket;
|
||||||
|
|
||||||
|
|
||||||
|
@ -281,7 +279,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.PLAYER_INTERACTION_PROFILE:
|
case PacketBuilder.PLAYER_INTERACTION_PROFILE:
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int playerId = -1;
|
int playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -304,7 +302,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.PLAYER_INTERACTION_MUTE:
|
case PacketBuilder.PLAYER_INTERACTION_MUTE:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
playerId = -1;
|
playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -332,7 +330,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.PLAYER_INTERACTION_UNMUTE:
|
case PacketBuilder.PLAYER_INTERACTION_UNMUTE:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
playerId = -1;
|
playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -360,7 +358,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.PLAYER_INTERACTION_REMOVE_BUDDY:
|
case PacketBuilder.PLAYER_INTERACTION_REMOVE_BUDDY:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
playerId = -1;
|
playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -388,7 +386,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.PLAYER_INTERACTION_TAG:
|
case PacketBuilder.PLAYER_INTERACTION_TAG:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
playerId = -1;
|
playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -427,7 +425,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.PLAYER_INTERACTION_ADD_BUDDY:
|
case PacketBuilder.PLAYER_INTERACTION_ADD_BUDDY:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
playerId = -1;
|
playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -451,7 +449,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
|
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string idStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string idStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
char firstChar = idStr[0];
|
char firstChar = idStr[0];
|
||||||
switch (firstChar)
|
switch (firstChar)
|
||||||
{
|
{
|
||||||
|
@ -522,7 +520,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.PLAYER_INTERACTION_TRADE:
|
case PacketBuilder.PLAYER_INTERACTION_TRADE:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
playerId = -1;
|
playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -578,7 +576,7 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
case PacketBuilder.SOCIALS_MENU:
|
case PacketBuilder.SOCIALS_MENU:
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int playerId = -1;
|
int playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -767,7 +765,7 @@ namespace HISP.Server
|
||||||
Auction auctionRoom = Auction.GetAuctionRoomById(int.Parse(tile.Code.Split('-')[1]));
|
Auction auctionRoom = Auction.GetAuctionRoomById(int.Parse(tile.Code.Split('-')[1]));
|
||||||
int auctionEntryId = -1;
|
int auctionEntryId = -1;
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string auctionEntryStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string auctionEntryStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
auctionEntryId = int.Parse(auctionEntryStr);
|
auctionEntryId = int.Parse(auctionEntryStr);
|
||||||
|
@ -840,7 +838,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_FEED:
|
case PacketBuilder.HORSE_FEED:
|
||||||
int randomId = 0;
|
int randomId = 0;
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
randomId = int.Parse(randomIdStr);
|
randomId = int.Parse(randomIdStr);
|
||||||
|
@ -869,7 +867,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_PET:
|
case PacketBuilder.HORSE_PET:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
randomId = int.Parse(randomIdStr);
|
randomId = int.Parse(randomIdStr);
|
||||||
|
@ -959,7 +957,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_VET_SERVICE:
|
case PacketBuilder.HORSE_VET_SERVICE:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
if (randomIdStr == "NaN")
|
if (randomIdStr == "NaN")
|
||||||
break;
|
break;
|
||||||
|
@ -1020,7 +1018,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_SHOE_IRON:
|
case PacketBuilder.HORSE_SHOE_IRON:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
if (randomIdStr == "NaN")
|
if (randomIdStr == "NaN")
|
||||||
break;
|
break;
|
||||||
|
@ -1144,7 +1142,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_GROOM_SERVICE:
|
case PacketBuilder.HORSE_GROOM_SERVICE:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
if (randomIdStr == "NaN")
|
if (randomIdStr == "NaN")
|
||||||
break;
|
break;
|
||||||
|
@ -1258,7 +1256,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_BARN_SERVICE:
|
case PacketBuilder.HORSE_BARN_SERVICE:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
if (randomIdStr == "NaN")
|
if (randomIdStr == "NaN")
|
||||||
break;
|
break;
|
||||||
|
@ -1374,7 +1372,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_TRAIN:
|
case PacketBuilder.HORSE_TRAIN:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
if (randomIdStr == "NaN")
|
if (randomIdStr == "NaN")
|
||||||
break;
|
break;
|
||||||
|
@ -1479,7 +1477,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_GIVE_FEED:
|
case PacketBuilder.HORSE_GIVE_FEED:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
randomId = int.Parse(randomIdStr);
|
randomId = int.Parse(randomIdStr);
|
||||||
|
@ -1619,7 +1617,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_ENTER_ARENA:
|
case PacketBuilder.HORSE_ENTER_ARENA:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
randomId = int.Parse(randomIdStr);
|
randomId = int.Parse(randomIdStr);
|
||||||
|
@ -1709,7 +1707,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_RELEASE:
|
case PacketBuilder.HORSE_RELEASE:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
randomId = int.Parse(randomIdStr);
|
randomId = int.Parse(randomIdStr);
|
||||||
|
@ -1763,7 +1761,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_TACK:
|
case PacketBuilder.HORSE_TACK:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
randomId = int.Parse(randomIdStr);
|
randomId = int.Parse(randomIdStr);
|
||||||
|
@ -1802,7 +1800,7 @@ namespace HISP.Server
|
||||||
|
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
randomId = int.Parse(randomIdStr);
|
randomId = int.Parse(randomIdStr);
|
||||||
|
@ -1856,7 +1854,7 @@ namespace HISP.Server
|
||||||
|
|
||||||
int itemId = 0;
|
int itemId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string itemIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string itemIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
itemId = int.Parse(itemIdStr);
|
itemId = int.Parse(itemIdStr);
|
||||||
|
@ -2025,7 +2023,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_DISMOUNT:
|
case PacketBuilder.HORSE_DISMOUNT:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
if(randomIdStr == "") // F7 Shortcut
|
if(randomIdStr == "") // F7 Shortcut
|
||||||
{
|
{
|
||||||
|
@ -2072,7 +2070,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_MOUNT:
|
case PacketBuilder.HORSE_MOUNT:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
randomId = int.Parse(randomIdStr);
|
randomId = int.Parse(randomIdStr);
|
||||||
|
@ -2096,7 +2094,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_LOOK:
|
case PacketBuilder.HORSE_LOOK:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
HorseInstance horseInst;
|
HorseInstance horseInst;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2188,7 +2186,7 @@ namespace HISP.Server
|
||||||
case PacketBuilder.HORSE_TRY_CAPTURE:
|
case PacketBuilder.HORSE_TRY_CAPTURE:
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
randomId = int.Parse(randomIdStr);
|
randomId = int.Parse(randomIdStr);
|
||||||
|
@ -2233,7 +2231,7 @@ namespace HISP.Server
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string dynamicInputStr = packetStr.Substring(1, (packetStr.Length - 1) - PACKET_FOOTER_LENGTH);
|
string dynamicInputStr = packetStr.Substring(1, (packetStr.Length - 1) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
if(dynamicInputStr.Contains("|"))
|
if(dynamicInputStr.Contains("|"))
|
||||||
{
|
{
|
||||||
string[] dynamicInput = dynamicInputStr.Split('|');
|
string[] dynamicInput = dynamicInputStr.Split('|');
|
||||||
|
@ -2836,7 +2834,7 @@ namespace HISP.Server
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string buttonIdStr = packetStr.Substring(1, (packetStr.Length - 1) - PACKET_FOOTER_LENGTH);
|
string buttonIdStr = packetStr.Substring(1, (packetStr.Length - 1) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
switch(buttonIdStr)
|
switch(buttonIdStr)
|
||||||
{
|
{
|
||||||
|
@ -3638,7 +3636,7 @@ namespace HISP.Server
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string scoreStr = packetStr.Substring(1, (packet.Length - 1) - PACKET_FOOTER_LENGTH);
|
string scoreStr = packetStr.Substring(1, (packet.Length - 1) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int score = -1;
|
int score = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -3842,7 +3840,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int playerId = -1;
|
int playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -3863,7 +3861,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
playerIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
playerId = -1;
|
playerId = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -4059,7 +4057,7 @@ namespace HISP.Server
|
||||||
|
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
|
|
||||||
string drawing = packetStr.Substring(3, (packetStr.Length - 3) - PACKET_FOOTER_LENGTH);
|
string drawing = packetStr.Substring(3, (packetStr.Length - 3) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
if (drawing.Contains("X!")) // Clear byte
|
if (drawing.Contains("X!")) // Clear byte
|
||||||
{
|
{
|
||||||
room.Drawing = "";
|
room.Drawing = "";
|
||||||
|
@ -4218,7 +4216,7 @@ namespace HISP.Server
|
||||||
Dressup.DressupRoom room = Dressup.GetDressupRoom(roomId);
|
Dressup.DressupRoom room = Dressup.GetDressupRoom(roomId);
|
||||||
|
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string moveStr = packetStr.Substring(3, (packetStr.Length - 3) - PACKET_FOOTER_LENGTH);
|
string moveStr = packetStr.Substring(3, (packetStr.Length - 3) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
string[] moves = moveStr.Split('|');
|
string[] moves = moveStr.Split('|');
|
||||||
|
|
||||||
|
@ -4484,7 +4482,7 @@ namespace HISP.Server
|
||||||
int characterId = (packet[2] - 20) * 64 + (packet[3] - 20);
|
int characterId = (packet[2] - 20) * 64 + (packet[3] - 20);
|
||||||
|
|
||||||
string profilePage = packetStr.Split('|')[1];
|
string profilePage = packetStr.Split('|')[1];
|
||||||
profilePage = profilePage.Substring(0, profilePage.Length - PACKET_FOOTER_LENGTH);
|
profilePage = profilePage.Substring(0, profilePage.Length - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
sender.LoggedinUser.CharacterId = characterId;
|
sender.LoggedinUser.CharacterId = characterId;
|
||||||
|
|
||||||
if (profilePage.Length > 4000)
|
if (profilePage.Length > 4000)
|
||||||
|
@ -4528,7 +4526,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string awardIdStr = packetStr.Substring(6, (packetStr.Length - 6) - PACKET_FOOTER_LENGTH);
|
string awardIdStr = packetStr.Substring(6, (packetStr.Length - 6) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
int value = -1;
|
int value = -1;
|
||||||
try
|
try
|
||||||
|
@ -4571,7 +4569,7 @@ namespace HISP.Server
|
||||||
|
|
||||||
|
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string gameInfoStr = packetStr.Substring(6, (packetStr.Length - 6) - PACKET_FOOTER_LENGTH);
|
string gameInfoStr = packetStr.Substring(6, (packetStr.Length - 6) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
if (winloose)
|
if (winloose)
|
||||||
{
|
{
|
||||||
string gameTitle = gameInfoStr.Substring(1);
|
string gameTitle = gameInfoStr.Substring(1);
|
||||||
|
@ -4695,7 +4693,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string gameInfoStr = packetStr.Substring(6, (packetStr.Length - 6) - PACKET_FOOTER_LENGTH);
|
string gameInfoStr = packetStr.Substring(6, (packetStr.Length - 6) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
if (gameInfoStr.Contains("|"))
|
if (gameInfoStr.Contains("|"))
|
||||||
{
|
{
|
||||||
string[] moneyInfo = gameInfoStr.Split('|');
|
string[] moneyInfo = gameInfoStr.Split('|');
|
||||||
|
@ -4749,7 +4747,7 @@ namespace HISP.Server
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string intStr = packetStr.Substring(6, (packetStr.Length - 6) - PACKET_FOOTER_LENGTH);
|
string intStr = packetStr.Substring(6, (packetStr.Length - 6) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int value = -1;
|
int value = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -4809,7 +4807,7 @@ namespace HISP.Server
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string intStr = packetStr.Substring(6, (packetStr.Length - 6) - PACKET_FOOTER_LENGTH);
|
string intStr = packetStr.Substring(6, (packetStr.Length - 6) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int value = -1;
|
int value = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -4862,7 +4860,7 @@ namespace HISP.Server
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string intStr = packetStr.Substring(6, (packetStr.Length - 6) - PACKET_FOOTER_LENGTH);
|
string intStr = packetStr.Substring(6, (packetStr.Length - 6) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int value = -1;
|
int value = -1;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -4900,7 +4898,7 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
sender.LoggedinUser.MajorPriority = true;
|
sender.LoggedinUser.MajorPriority = true;
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string gameName = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string gameName = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
byte[] metaTag = PacketBuilder.CreateMeta(Meta.BuildTopHighscores(gameName));
|
byte[] metaTag = PacketBuilder.CreateMeta(Meta.BuildTopHighscores(gameName));
|
||||||
sender.SendPacket(metaTag);
|
sender.SendPacket(metaTag);
|
||||||
}
|
}
|
||||||
|
@ -4908,7 +4906,7 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
sender.LoggedinUser.MajorPriority = true;
|
sender.LoggedinUser.MajorPriority = true;
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string gameName = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string gameName = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
byte[] metaTag = PacketBuilder.CreateMeta(Meta.BuildTopTimes(gameName));
|
byte[] metaTag = PacketBuilder.CreateMeta(Meta.BuildTopTimes(gameName));
|
||||||
sender.SendPacket(metaTag);
|
sender.SendPacket(metaTag);
|
||||||
}
|
}
|
||||||
|
@ -4916,7 +4914,7 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
sender.LoggedinUser.MajorPriority = true;
|
sender.LoggedinUser.MajorPriority = true;
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string gameName = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string gameName = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
byte[] metaTag = PacketBuilder.CreateMeta(Meta.BuildTopWinners(gameName));
|
byte[] metaTag = PacketBuilder.CreateMeta(Meta.BuildTopWinners(gameName));
|
||||||
sender.SendPacket(metaTag);
|
sender.SendPacket(metaTag);
|
||||||
}
|
}
|
||||||
|
@ -5244,7 +5242,7 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
|
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string number = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string number = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int chatId = 0;
|
int chatId = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -5282,7 +5280,7 @@ namespace HISP.Server
|
||||||
else if (action == PacketBuilder.NPC_CONTINUE_CHAT)
|
else if (action == PacketBuilder.NPC_CONTINUE_CHAT)
|
||||||
{
|
{
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string number = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string number = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int replyId = 0;
|
int replyId = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -5333,7 +5331,7 @@ namespace HISP.Server
|
||||||
|
|
||||||
|
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string number = packetStr.Substring(1, (packetStr.Length - 1) - PACKET_FOOTER_LENGTH);
|
string number = packetStr.Substring(1, (packetStr.Length - 1) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
int transportid;
|
int transportid;
|
||||||
try
|
try
|
||||||
|
@ -5433,7 +5431,7 @@ namespace HISP.Server
|
||||||
|
|
||||||
if (method == PacketBuilder.RANCH_INFO)
|
if (method == PacketBuilder.RANCH_INFO)
|
||||||
{
|
{
|
||||||
string buildingIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string buildingIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int buildingId = 0;
|
int buildingId = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -5461,7 +5459,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
else if (method == PacketBuilder.RANCH_SELL)
|
else if (method == PacketBuilder.RANCH_SELL)
|
||||||
{
|
{
|
||||||
string NanSTR = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string NanSTR = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
if (NanSTR == "NaN")
|
if (NanSTR == "NaN")
|
||||||
{
|
{
|
||||||
if (sender.LoggedinUser.OwnedRanch == null)
|
if (sender.LoggedinUser.OwnedRanch == null)
|
||||||
|
@ -5492,7 +5490,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
else if (method == PacketBuilder.RANCH_UPGRADE)
|
else if (method == PacketBuilder.RANCH_UPGRADE)
|
||||||
{
|
{
|
||||||
string NanSTR = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string NanSTR = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
if (NanSTR == "NaN")
|
if (NanSTR == "NaN")
|
||||||
{
|
{
|
||||||
if (sender.LoggedinUser.OwnedRanch != null)
|
if (sender.LoggedinUser.OwnedRanch != null)
|
||||||
|
@ -5543,7 +5541,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
else if (method == PacketBuilder.RANCH_REMOVE)
|
else if (method == PacketBuilder.RANCH_REMOVE)
|
||||||
{
|
{
|
||||||
string buildingIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string buildingIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int buildingId = 0;
|
int buildingId = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -5601,7 +5599,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
else if (method == PacketBuilder.RANCH_BUILD)
|
else if (method == PacketBuilder.RANCH_BUILD)
|
||||||
{
|
{
|
||||||
string buildingIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string buildingIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int buildingId = 0;
|
int buildingId = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -5655,7 +5653,7 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
else if (method == PacketBuilder.RANCH_BUY)
|
else if (method == PacketBuilder.RANCH_BUY)
|
||||||
{
|
{
|
||||||
string nan = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string nan = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
if (nan == "NaN")
|
if (nan == "NaN")
|
||||||
{
|
{
|
||||||
if (Ranch.IsRanchHere(sender.LoggedinUser.X, sender.LoggedinUser.Y))
|
if (Ranch.IsRanchHere(sender.LoggedinUser.X, sender.LoggedinUser.Y))
|
||||||
|
@ -5780,7 +5778,7 @@ namespace HISP.Server
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
|
|
||||||
Chat.ChatChannel channel = (Chat.ChatChannel)packet[1];
|
Chat.ChatChannel channel = (Chat.ChatChannel)packet[1];
|
||||||
string message = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string message = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
Logger.DebugPrint(sender.LoggedinUser.Username + " Attempting to say '" + message + "' in channel: " + channel.ToString());
|
Logger.DebugPrint(sender.LoggedinUser.Username + " Attempting to say '" + message + "' in channel: " + channel.ToString());
|
||||||
|
|
||||||
|
@ -6055,7 +6053,7 @@ namespace HISP.Server
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
if(packetStr.Contains("|"))
|
if(packetStr.Contains("|"))
|
||||||
{
|
{
|
||||||
string packetContents = packetStr.Substring(1, (packetStr.Length - 1) - PACKET_FOOTER_LENGTH);
|
string packetContents = packetStr.Substring(1, (packetStr.Length - 1) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
string[] xy = packetContents.Split('|');
|
string[] xy = packetContents.Split('|');
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
|
@ -6158,7 +6156,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_PICKUP:
|
case PacketBuilder.ITEM_PICKUP:
|
||||||
string packetStr = Encoding.UTF8.GetString(packet);
|
string packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int randomId = 0;
|
int randomId = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -6323,7 +6321,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_THROW:
|
case PacketBuilder.ITEM_THROW:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string itemidStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string itemidStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int itemId = 0;
|
int itemId = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -6389,7 +6387,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_WRAP:
|
case PacketBuilder.ITEM_WRAP:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -6425,7 +6423,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_OPEN:
|
case PacketBuilder.ITEM_OPEN:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packet.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packet.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -6471,7 +6469,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_USE:
|
case PacketBuilder.ITEM_USE:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
|
|
||||||
if(randomIdStr == "") // f12 ranch shortcut
|
if(randomIdStr == "") // f12 ranch shortcut
|
||||||
{
|
{
|
||||||
|
@ -6508,7 +6506,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_WEAR:
|
case PacketBuilder.ITEM_WEAR:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -6624,7 +6622,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_DRINK:
|
case PacketBuilder.ITEM_DRINK:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string idStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string idStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
if(idStr == "NaN") // Fountain
|
if(idStr == "NaN") // Fountain
|
||||||
{
|
{
|
||||||
string msg = Messages.FountainDrankYourFull;
|
string msg = Messages.FountainDrankYourFull;
|
||||||
|
@ -6649,7 +6647,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_CONSUME:
|
case PacketBuilder.ITEM_CONSUME:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -6687,7 +6685,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_DROP:
|
case PacketBuilder.ITEM_DROP:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -6761,7 +6759,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_CRAFT:
|
case PacketBuilder.ITEM_CRAFT:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string craftIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string craftIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int craftId = 0;
|
int craftId = 0;
|
||||||
// Prevent crashing on non-int string.
|
// Prevent crashing on non-int string.
|
||||||
try
|
try
|
||||||
|
@ -6840,7 +6838,7 @@ namespace HISP.Server
|
||||||
int message = 1;
|
int message = 1;
|
||||||
|
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
// Prevent crashing on non-int string.
|
// Prevent crashing on non-int string.
|
||||||
try
|
try
|
||||||
|
@ -6864,7 +6862,7 @@ namespace HISP.Server
|
||||||
goto doSell;
|
goto doSell;
|
||||||
case PacketBuilder.ITEM_SELL_ALL:
|
case PacketBuilder.ITEM_SELL_ALL:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string itemIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
string itemIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
itemId = 0;
|
itemId = 0;
|
||||||
// Prevent crashing on non-int string.
|
// Prevent crashing on non-int string.
|
||||||
try
|
try
|
||||||
|
@ -6942,7 +6940,7 @@ namespace HISP.Server
|
||||||
|
|
||||||
case PacketBuilder.ITEM_BUY_AND_CONSUME:
|
case PacketBuilder.ITEM_BUY_AND_CONSUME:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
itemIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PACKET_FOOTER_LENGTH);
|
itemIdStr = packetStr.Substring(2, (packetStr.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
itemId = 0;
|
itemId = 0;
|
||||||
// Prevent crashing on non-int string.
|
// Prevent crashing on non-int string.
|
||||||
try
|
try
|
||||||
|
@ -7021,7 +7019,7 @@ namespace HISP.Server
|
||||||
count = 25;
|
count = 25;
|
||||||
doPurchase:;
|
doPurchase:;
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
itemIdStr = packetStr.Substring(2, (packet.Length - 2) - PACKET_FOOTER_LENGTH);
|
itemIdStr = packetStr.Substring(2, (packet.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
itemId = 0;
|
itemId = 0;
|
||||||
// Prevent crashing on non-int string.
|
// Prevent crashing on non-int string.
|
||||||
try
|
try
|
||||||
|
@ -7153,7 +7151,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.ITEM_RIP:
|
case PacketBuilder.ITEM_RIP:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(2, (packet.Length - 2) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(2, (packet.Length - 2) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -7188,7 +7186,7 @@ namespace HISP.Server
|
||||||
if (method == PacketBuilder.ITEM_LOOK)
|
if (method == PacketBuilder.ITEM_LOOK)
|
||||||
{
|
{
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
itemIdStr = packetStr.Substring(3, (packetStr.Length - 3) - PACKET_FOOTER_LENGTH);
|
itemIdStr = packetStr.Substring(3, (packetStr.Length - 3) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
itemId = 0;
|
itemId = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -7217,7 +7215,7 @@ namespace HISP.Server
|
||||||
else if(method == PacketBuilder.ITEM_READ)
|
else if(method == PacketBuilder.ITEM_READ)
|
||||||
{
|
{
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
randomIdStr = packetStr.Substring(3, (packetStr.Length - 3) - PACKET_FOOTER_LENGTH);
|
randomIdStr = packetStr.Substring(3, (packetStr.Length - 3) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
randomId = 0;
|
randomId = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -7258,7 +7256,7 @@ namespace HISP.Server
|
||||||
break;
|
break;
|
||||||
case PacketBuilder.PACKET_INFORMATION:
|
case PacketBuilder.PACKET_INFORMATION:
|
||||||
packetStr = Encoding.UTF8.GetString(packet);
|
packetStr = Encoding.UTF8.GetString(packet);
|
||||||
string valueStr = packetStr.Substring(3, (packetStr.Length - 3) - PACKET_FOOTER_LENGTH);
|
string valueStr = packetStr.Substring(3, (packetStr.Length - 3) - PacketBuilder.PACKET_CLIENT_TERMINATOR_LENGTH);
|
||||||
int value = 0;
|
int value = 0;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
public class PacketBuilder
|
public class PacketBuilder
|
||||||
{
|
{
|
||||||
|
public const int PACKET_CLIENT_TERMINATOR_LENGTH = 1;
|
||||||
public const byte PACKET_CLIENT_TERMINATOR = 0x0A;
|
public const byte PACKET_CLIENT_TERMINATOR = 0x0A;
|
||||||
|
|
||||||
public const byte PACKET_LOGIN = 0x7F;
|
public const byte PACKET_LOGIN = 0x7F;
|
||||||
|
|
|
@ -30,8 +30,8 @@ using System.Runtime.InteropServices;
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.8.54.0")]
|
[assembly: AssemblyVersion("1.8.55.0")]
|
||||||
[assembly: AssemblyFileVersion("1.8.54.0")]
|
[assembly: AssemblyFileVersion("1.8.55.0")]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue