Packet Changes: 9.71 to 9.81
Incoming
Added
LoginSuccess - 23 (0x17)
Code:
PlayerID - UInt32
BeatDuration - UInt16
CreatureSpeedA - Double
CreatureSpeedB - Double
CreatureSpeedC - Double
BugReportsAllowed - Byte (Boolean)
Updated
BuddyData
Code:
IsOnline = msg.GetByte().Equals(0x01);
to
Code:
IsOnline = msg.GetByte();
IsOnline is now a byte value instead of a boolean value. Probably for the new connection states.
BuddyStatusChange (BuddyLogin)
Code:
PlayerId = msg.GetUInt32();
to
Code:
PlayerId = msg.GetUInt32();
byte ConnectionStatus = msg.GetByte();
The BuddyStatusChange packet (formerly BuddlyLogin/VIPLogin) now includes a byte indicating your buddy's (VIP's) connection to the game world.
MarketEnter
Code:
uint AccountBalance = msg.GetUInt32();
to
Code:
uint64 AccountBalance = msg.GetUInt64();
AccountBalance is, obviously, now a UInt64 value instead of a UInt32.
PlayerGoods
Code:
Cash = msg.GetUInt32();
to
Code:
Cash = msg.GetUInt64();
Cash is, obviously, now a UInt64 value instead of a UInt32.
Outgoing
Added
EnterWorld - 15 (0xF)
No arguments, but the flash client puts the sendPacket() call in a try/catch block.
CipSoft's readUnsigned64BitValue, readDouble, and readSigned64BitValue functions from their flash client:
Code:
protected function readUnsigned64BitValue(param1:ByteArray) : Number
{
var _loc_2:* = param1.readUnsignedInt();
var _loc_3:* = param1.readUnsignedInt();
if ((_loc_3 & 4292870144) != 0)
{
throw new RangeError("Connection.readUnsigned64BitValue: Value out of range.");
}
return Number(_loc_2) + Number(_loc_3 & 2097151) * Math.pow(2, 32);
}// end function
Code:
protected function readDouble(param1:ByteArray) : Number
{
var _loc_2:* = param1.readUnsignedByte();
var _loc_3:* = param1.readUnsignedInt();
return (_loc_3 - int.MAX_VALUE) / Math.pow(10, _loc_2);
}// end function
Code:
protected function readSigned64BitValue(param1:ByteArray) : Number
{
var _loc_2:* = param1.readUnsignedInt();
var _loc_3:* = param1.readUnsignedInt();
if ((_loc_3 & 2145386496) != 0)
{
throw new RangeError("Connection.readSigned64BitValue: Value out of range.");
}
var _loc_4:* = Number(_loc_2) + Number(_loc_3 & 2097151) * Math.pow(2, 32);
if ((_loc_3 & 2147483648) != 0)
{
return -_loc_4;
}
return _loc_4;
}// end function