mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 14:34:32 +02:00
Fixed how login/zoning session start is handled. Should fix the bug where a player could not relogin into a server twice.
This commit is contained in:
parent
ed5ee01ba6
commit
dbaea65c19
5 changed files with 34 additions and 6 deletions
|
@ -150,9 +150,9 @@ namespace FFXIVClassic_World_Server.DataObjects
|
|||
}
|
||||
}
|
||||
|
||||
public void SendSessionStart(Session session)
|
||||
public void SendSessionStart(Session session, bool isLogin = false)
|
||||
{
|
||||
SendPacket(SessionBeginPacket.BuildPacket(session));
|
||||
SendPacket(SessionBeginPacket.BuildPacket(session, isLogin));
|
||||
}
|
||||
|
||||
public void SendSessionEnd(Session session)
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace FFXIVClassic_World_Server
|
|||
mServer.AddSession(client, Session.Channel.ZONE, hello.sessionId);
|
||||
Session session = mServer.GetSession(hello.sessionId);
|
||||
session.routing1 = mServer.GetWorldManager().GetZoneServer(session.currentZoneId);
|
||||
session.routing1.SendSessionStart(session);
|
||||
session.routing1.SendSessionStart(session, true);
|
||||
}
|
||||
else if (packet.header.connectionType == BasePacket.TYPE_CHAT)
|
||||
mServer.AddSession(client, Session.Channel.CHAT, hello.sessionId);
|
||||
|
|
|
@ -14,10 +14,21 @@ namespace FFXIVClassic_World_Server.Packets.WorldPackets.Send
|
|||
public const ushort OPCODE = 0x1000;
|
||||
public const uint PACKET_SIZE = 0x24;
|
||||
|
||||
public static SubPacket BuildPacket(Session session)
|
||||
public static SubPacket BuildPacket(Session session, bool isLogin)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
if (isLogin)
|
||||
{
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((Byte)1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(true, OPCODE, 0, session.sessionId, data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue