mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-02 15:51:53 +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
|
@ -70,7 +70,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
return SetActorSpeedPacket.BuildPacket(actorId, playerActorId);
|
||||
}
|
||||
|
||||
public SubPacket CreateSpawnPositonPacket(uint playerActorId, uint spawnType)
|
||||
public SubPacket CreateSpawnPositonPacket(uint playerActorId, ushort spawnType)
|
||||
{
|
||||
SubPacket spawnPacket;
|
||||
if (!spawnedFirstTime && playerActorId == actorId)
|
||||
|
@ -91,7 +91,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
return spawnPacket;
|
||||
}
|
||||
|
||||
public SubPacket CreateSpawnTeleportPacket(uint playerActorId, uint spawnType)
|
||||
public SubPacket CreateSpawnTeleportPacket(uint playerActorId, ushort spawnType)
|
||||
{
|
||||
SubPacket spawnPacket;
|
||||
|
||||
|
@ -223,7 +223,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
return GetSpawnPackets(playerActorId, 0x1);
|
||||
}
|
||||
|
||||
public virtual BasePacket GetSpawnPackets(uint playerActorId, uint spawnType)
|
||||
public virtual BasePacket GetSpawnPackets(uint playerActorId, ushort spawnType)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(CreateAddActorPacket(playerActorId, 8));
|
||||
|
|
|
@ -116,7 +116,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
public override BasePacket GetSpawnPackets(uint playerActorId, uint spawnType)
|
||||
public override BasePacket GetSpawnPackets(uint playerActorId, ushort spawnType)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(CreateAddActorPacket(playerActorId));
|
||||
|
|
|
@ -83,7 +83,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
|
||||
public Coroutine currentEventRunning;
|
||||
|
||||
//Player Info
|
||||
//Player Info
|
||||
public uint destinationZone;
|
||||
public ushort destinationSpawnType;
|
||||
public uint[] timers = new uint[20];
|
||||
public ushort currentJob;
|
||||
public uint currentTitle;
|
||||
|
@ -257,9 +259,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
else
|
||||
lParams = LuaUtils.CreateLuaParamList("/Chara/Player/Player_work", false, false, false, false, false, true);
|
||||
return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
public override BasePacket GetSpawnPackets(uint playerActorId, uint spawnType)
|
||||
}
|
||||
|
||||
public override BasePacket GetSpawnPackets(uint playerActorId, ushort spawnType)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(CreateAddActorPacket(playerActorId, 8));
|
||||
|
@ -646,14 +648,47 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
}
|
||||
|
||||
public void CleanupAndSave()
|
||||
{
|
||||
{
|
||||
playerSession.LockUpdates(true);
|
||||
|
||||
//Remove actor from zone and main server list
|
||||
zone.RemoveActorFromZone(this);
|
||||
|
||||
//Set Destination to 0
|
||||
this.destinationZone = 0;
|
||||
this.destinationSpawnType = 0;
|
||||
|
||||
//Save Player
|
||||
Database.SavePlayerPlayTime(this);
|
||||
Database.SavePlayerPosition(this);
|
||||
Program.Log.Info("{0} has been logged out and saved.", this.customDisplayName);
|
||||
Database.SavePlayerPosition(this);
|
||||
|
||||
Server.GetServer().RemoveSession(playerSession.id);
|
||||
|
||||
Program.Log.Info("{0} has been removed from the session list.", this.customDisplayName);
|
||||
}
|
||||
|
||||
public void CleanupAndSave(uint destinationZone, ushort spawnType, float destinationX, float destinationY, float destinationZ, float destinationRot)
|
||||
{
|
||||
playerSession.LockUpdates(true);
|
||||
|
||||
//Remove actor from zone and main server list
|
||||
zone.RemoveActorFromZone(this);
|
||||
|
||||
//Set destination
|
||||
this.destinationZone = destinationZone;
|
||||
this.destinationSpawnType = spawnType;
|
||||
this.positionX = destinationX;
|
||||
this.positionY = destinationY;
|
||||
this.positionZ = destinationZ;
|
||||
this.rotation = destinationRot;
|
||||
|
||||
//Save Player
|
||||
Database.SavePlayerPlayTime(this);
|
||||
Database.SavePlayerPosition(this);
|
||||
|
||||
Server.GetServer().RemoveSession(playerSession.id);
|
||||
|
||||
Program.Log.Info("{0} has been removed from the session list.", this.customDisplayName);
|
||||
}
|
||||
|
||||
public Area GetZone()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue