mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 22:44:36 +02:00
Cleaned up script packets and added the InfoResponse packet (internally the DataPacket). Added more info to the music packets. More work on class changing.
This commit is contained in:
parent
01eceee58f
commit
a93843510e
7 changed files with 139 additions and 62 deletions
|
@ -32,43 +32,7 @@ namespace FFXIVClassic_Map_Server.packets.send.events
|
|||
binWriter.Write(Encoding.ASCII.GetBytes(callFunction), 0, Encoding.ASCII.GetByteCount(callFunction) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(callFunction));
|
||||
binWriter.Seek(0x49, SeekOrigin.Begin);
|
||||
|
||||
//Write out params
|
||||
foreach (LuaParam p in luaParams)
|
||||
{
|
||||
binWriter.Write((Byte)p.typeID);
|
||||
switch (p.typeID)
|
||||
{
|
||||
case 0x0: //Int32
|
||||
binWriter.Write(Utils.swapEndian((Int32)p.value));
|
||||
break;
|
||||
case 0x1: //Int32
|
||||
binWriter.Write(Utils.swapEndian((UInt32)p.value));
|
||||
break;
|
||||
case 0x2: //Null Termed String
|
||||
string svalue = (string)p.value;
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(svalue), 0, Encoding.ASCII.GetByteCount(svalue));
|
||||
if (svalue[svalue.Length - 1] != '\0')
|
||||
binWriter.Write((Byte)0);
|
||||
break;
|
||||
case 0x3: //Boolean False
|
||||
break;
|
||||
case 0x4: //Boolean True
|
||||
break;
|
||||
case 0x5: //Nil
|
||||
break;
|
||||
case 0x6: //Actor (By Id)
|
||||
binWriter.Write(Utils.swapEndian((UInt32)p.value));
|
||||
break;
|
||||
case 0xC: //Byte
|
||||
binWriter.Write((Byte)p.value);
|
||||
break;
|
||||
case 0x1B: //Short?
|
||||
//value = reader.ReadUInt16();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
binWriter.Write((Byte)0xF);
|
||||
LuaUtils.writeLuaParams(binWriter, luaParams);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue