mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-10 14:34:32 +02:00
Built subpackets to let the zone servers talk to the world server. Implemented cross-server zoning but the E2 packet or something isn't being sent.
This commit is contained in:
parent
58fda93b45
commit
e30831fdc5
27 changed files with 674 additions and 113 deletions
|
@ -20,6 +20,8 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
public uint languageCode = 1;
|
||||
private uint lastPingPacket = Utils.UnixTimeStampUTC();
|
||||
|
||||
public bool isUpdatesLocked = false;
|
||||
|
||||
public string errorMessage = "";
|
||||
|
||||
public Session(uint sessionId)
|
||||
|
@ -63,6 +65,9 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
|
||||
public void UpdatePlayerActorPosition(float x, float y, float z, float rot, ushort moveState)
|
||||
{
|
||||
if (isUpdatesLocked)
|
||||
return;
|
||||
|
||||
playerActor.oldPositionX = playerActor.positionX;
|
||||
playerActor.oldPositionY = playerActor.positionY;
|
||||
playerActor.oldPositionZ = playerActor.positionZ;
|
||||
|
@ -80,6 +85,9 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
|
||||
public void UpdateInstance(List<Actor> list)
|
||||
{
|
||||
if (isUpdatesLocked)
|
||||
return;
|
||||
|
||||
List<BasePacket> basePackets = new List<BasePacket>();
|
||||
List<SubPacket> RemoveActorSubpackets = new List<SubPacket>();
|
||||
List<SubPacket> posUpdateSubpackets = new List<SubPacket>();
|
||||
|
@ -132,5 +140,10 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
actorInstanceList.Clear();
|
||||
}
|
||||
|
||||
|
||||
public void LockUpdates(bool f)
|
||||
{
|
||||
isUpdatesLocked = f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ using FFXIVClassic.Common;
|
|||
using System.Collections.Concurrent;
|
||||
using System.Net;
|
||||
using System.Collections.Generic;
|
||||
using FFXIVClassic_Map_Server.packets.WorldPackets.Send;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.dataobjects
|
||||
{
|
||||
|
@ -63,5 +64,11 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
if (socket.Connected)
|
||||
socket.Disconnect(false);
|
||||
}
|
||||
|
||||
public void RequestZoneChange(uint sessionId, uint destinationZoneId, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
||||
{
|
||||
WorldRequestZoneChangePacket.BuildPacket(sessionId, destinationZoneId, spawnType, spawnX, spawnY, spawnZ, spawnRotation).DebugPrintSubPacket();
|
||||
QueuePacket(WorldRequestZoneChangePacket.BuildPacket(sessionId, destinationZoneId, spawnType, spawnX, spawnY, spawnZ, spawnRotation), true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue