mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-11 23:14:39 +02:00
Merge branch 'develop' of https://bitbucket.org/Ioncannon/ffxiv-classic-server into develop
This commit is contained in:
commit
63ac56224e
15 changed files with 197 additions and 28 deletions
|
@ -88,7 +88,7 @@ namespace FFXIVClassic_Map_Server
|
|||
if (cmd.Any())
|
||||
{
|
||||
// if client isnt null, take player to be the player actor
|
||||
var player = client.GetActor();
|
||||
var player = client?.GetActor();
|
||||
|
||||
if (cmd.Equals("help"))
|
||||
{
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
<!-- add your logging rules here -->
|
||||
<logger name='*' minlevel='Trace' writeTo='file' />
|
||||
<logger name='FFXIVClassic_Map_Server.Program' minlevel='Trace' writeTo='console' />
|
||||
<logger name='FFXIVClassic_Map_Server.lua.*' minlevel='Trace' writeTo='console' />
|
||||
<logger name='FFXIVClassic_Map_Server.packets.*' minlevel='Debug' writeTo='packets' />
|
||||
<!--
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
|
|
|
@ -524,12 +524,10 @@ namespace FFXIVClassic_Map_Server
|
|||
//Moves actor to new zone, and sends packets to spawn at the given coords.
|
||||
public void DoZoneChange(Player player, uint destinationZoneId, string destinationPrivateArea, byte spawnType, float spawnX, float spawnY, float spawnZ, float spawnRotation)
|
||||
{
|
||||
Area oldZone;
|
||||
|
||||
Area oldZone = player.zone;
|
||||
//Remove player from currentZone if transfer else it's login
|
||||
if (player.zone != null)
|
||||
{
|
||||
oldZone = player.zone;
|
||||
oldZone.RemoveActorFromZone(player);
|
||||
}
|
||||
|
||||
|
@ -540,9 +538,20 @@ namespace FFXIVClassic_Map_Server
|
|||
newArea = GetZone(destinationZoneId);
|
||||
else
|
||||
newArea = GetZone(destinationZoneId).GetPrivateArea(destinationPrivateArea, 0);
|
||||
|
||||
//This server does not contain that zoneId
|
||||
if (newArea == null)
|
||||
{
|
||||
if (oldZone != null)
|
||||
{
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
newArea.AddActorToZone(player);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue