mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-24 05:35:51 +12:00
Add changing weather.
This commit is contained in:
parent
6c42c57bfe
commit
b4920205c8
7 changed files with 245 additions and 16 deletions
|
@ -139,6 +139,8 @@ namespace HISP.Server
|
|||
public const byte LOGIN_CUSTOM_MESSAGE = 0x16;
|
||||
public const byte LOGIN_SUCCESS = 0x14;
|
||||
|
||||
public const byte WEATHER_UPDATE = 0x13;
|
||||
|
||||
public const byte DIRECTION_UP = 0;
|
||||
public const byte DIRECTION_RIGHT = 1;
|
||||
public const byte DIRECTION_DOWN = 2;
|
||||
|
@ -146,6 +148,8 @@ namespace HISP.Server
|
|||
public const byte DIRECTION_TELEPORT = 4;
|
||||
public const byte DIRECTION_NONE = 10;
|
||||
|
||||
|
||||
|
||||
public static byte[] CreateBrickPoetMovePacket(Brickpoet.PoetryPeice peice)
|
||||
{
|
||||
|
||||
|
@ -590,6 +594,23 @@ namespace HISP.Server
|
|||
return Packet;
|
||||
}
|
||||
|
||||
public static byte[] CreateWeatherUpdatePacket(string newWeather)
|
||||
{
|
||||
byte[] strBytes = Encoding.UTF8.GetBytes(newWeather);
|
||||
|
||||
MemoryStream ms = new MemoryStream();
|
||||
ms.WriteByte(PACKET_WORLD);
|
||||
ms.WriteByte(WEATHER_UPDATE);
|
||||
ms.Write(strBytes, 0x00, strBytes.Length);
|
||||
ms.WriteByte(PACKET_TERMINATOR);
|
||||
|
||||
ms.Seek(0x00, SeekOrigin.Begin);
|
||||
byte[] Packet = ms.ToArray();
|
||||
ms.Dispose();
|
||||
|
||||
return Packet;
|
||||
}
|
||||
|
||||
public static byte[] CreateWorldData(int gameTime, int gameDay, int gameYear, string weather)
|
||||
{
|
||||
byte[] strBytes = Encoding.UTF8.GetBytes(weather);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue