mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +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
|
@ -384,9 +384,8 @@ namespace FFXIVClassic_Map_Server
|
|||
oldZone.AddActorToZone(player);
|
||||
}
|
||||
|
||||
var message = "WorldManager.DoZoneChange: unable to change areas, new area is not valid.";
|
||||
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM, "[Debug]", message);
|
||||
Program.Log.Debug(message);
|
||||
Program.Log.Debug("Request to change to zone not on this server by: {0}.", player.customDisplayName);
|
||||
RequestWorldServerZoneChange(player, destinationZoneId, spawnType, spawnX, spawnY, spawnZ, spawnRotation);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -450,8 +449,8 @@ namespace FFXIVClassic_Map_Server
|
|||
}
|
||||
}
|
||||
|
||||
//Login Zone In
|
||||
public void DoLogin(Player player)
|
||||
//Session started, zone into world
|
||||
public void DoZoneIn(Player player, bool isLogin, ushort spawnType)
|
||||
{
|
||||
//Add player to new zone and update
|
||||
Zone zone = GetZone(player.zoneId);
|
||||
|
@ -462,15 +461,19 @@ namespace FFXIVClassic_Map_Server
|
|||
|
||||
//Set the current zone and add player
|
||||
player.zone = zone;
|
||||
|
||||
LuaEngine.OnBeginLogin(player);
|
||||
|
||||
zone.AddActorToZone(player);
|
||||
|
||||
//Send packets
|
||||
player.SendZoneInPackets(this, 0x1);
|
||||
if (!isLogin)
|
||||
{
|
||||
player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId), true, false);
|
||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x0), true, false);
|
||||
player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x0), true, false);
|
||||
}
|
||||
|
||||
LuaEngine.OnLogin(player);
|
||||
player.SendZoneInPackets(this, spawnType);
|
||||
|
||||
LuaEngine.OnZoneIn(player);
|
||||
}
|
||||
|
||||
|
@ -485,6 +488,12 @@ namespace FFXIVClassic_Map_Server
|
|||
|
||||
}
|
||||
|
||||
private void RequestWorldServerZoneChange(Player player, uint destinationZoneId, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
||||
{
|
||||
ZoneConnection zc = Server.GetWorldConnection();
|
||||
zc.RequestZoneChange(player.playerSession.id, destinationZoneId, spawnType, spawnX, spawnY, spawnZ, spawnRotation);
|
||||
}
|
||||
|
||||
public Player GetPCInWorld(string name)
|
||||
{
|
||||
foreach (Zone zone in zoneList.Values)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue