mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-25 20:08:20 +02:00
Got linkshell creation working.
This commit is contained in:
parent
c3c19c3592
commit
1d3dd99414
10 changed files with 149 additions and 13 deletions
|
@ -294,6 +294,7 @@
|
|||
<Compile Include="packets\receive\UpdatePlayerPositionPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Receive\ErrorPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Receive\PartySyncPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Receive\LinkshellResultPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Receive\SessionEndPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Receive\SessionBeginPacket.cs" />
|
||||
<Compile Include="packets\WorldPackets\Send\Group\CreateLinkshellPacket.cs" />
|
||||
|
|
|
@ -88,6 +88,11 @@ namespace FFXIVClassic_Map_Server
|
|||
PartySyncPacket partySyncPacket = new PartySyncPacket(subpacket.data);
|
||||
Server.GetWorldManager().PartyMemberListRecieved(partySyncPacket);
|
||||
break;
|
||||
//World Server - Linkshell Creation Result
|
||||
case 0x1025:
|
||||
LinkshellResultPacket lsResult = new LinkshellResultPacket(subpacket.data);
|
||||
LuaEngine.GetInstance().OnSignal("ls_result", lsResult.resultCode);
|
||||
break;
|
||||
//Ping
|
||||
case 0x0001:
|
||||
//subpacket.DebugPrintSubPacket();
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace FFXIVClassic_Map_Server.lua
|
|||
}
|
||||
}
|
||||
|
||||
public void OnSignal(string signal)
|
||||
public void OnSignal(string signal, params object[] args)
|
||||
{
|
||||
List<Coroutine> mToAwake = new List<Coroutine>();
|
||||
|
||||
|
@ -103,7 +103,7 @@ namespace FFXIVClassic_Map_Server.lua
|
|||
|
||||
foreach (Coroutine key in mToAwake)
|
||||
{
|
||||
DynValue value = key.Resume();
|
||||
DynValue value = key.Resume(args);
|
||||
ResolveResume(null, key, value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.packets.WorldPackets.Receive
|
||||
{
|
||||
class LinkshellResultPacket
|
||||
{
|
||||
public int resultCode;
|
||||
|
||||
public bool invalidPacket = false;
|
||||
|
||||
public LinkshellResultPacket(byte[] data)
|
||||
{
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryReader binReader = new BinaryReader(mem))
|
||||
{
|
||||
try
|
||||
{
|
||||
resultCode = binReader.ReadInt32();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
invalidPacket = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -20,6 +20,7 @@ namespace FFXIVClassic_Map_Server.packets.WorldPackets.Send.Group
|
|||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(name), 0, Encoding.ASCII.GetByteCount(name) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(name));
|
||||
binWriter.BaseStream.Seek(0x20, SeekOrigin.Begin);
|
||||
binWriter.Write((UInt16)crest);
|
||||
binWriter.Write((UInt32)master);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue