mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-09 05:54:50 +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
|
@ -56,9 +56,12 @@ namespace FFXIVClassic_Map_Server
|
|||
//World Server - Session Begin
|
||||
case 0x1000:
|
||||
subpacket.DebugPrintSubPacket();
|
||||
|
||||
SessionBeginPacket beginSessionPacket = new SessionBeginPacket(subpacket.data);
|
||||
|
||||
session = mServer.AddSession(subpacket.header.targetId);
|
||||
|
||||
if (session.GetActor().destinationZone != 0)
|
||||
if (beginSessionPacket.isLogin)
|
||||
Server.GetWorldManager().DoZoneIn(session.GetActor(), false, session.GetActor().destinationSpawnType);
|
||||
|
||||
Program.Log.Info("{0} has been added to the session list.", session.GetActor().customDisplayName);
|
||||
|
|
|
@ -9,11 +9,25 @@ namespace FFXIVClassic_Map_Server.packets.WorldPackets.Receive
|
|||
{
|
||||
class SessionBeginPacket
|
||||
{
|
||||
public bool isLogin;
|
||||
public bool invalidPacket = false;
|
||||
|
||||
public SessionBeginPacket(byte[] data)
|
||||
{
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryReader binReader = new BinaryReader(mem))
|
||||
{
|
||||
try
|
||||
{
|
||||
isLogin = binReader.ReadByte() != 0;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
invalidPacket = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue