From 8c9ecebae63e5661702ed0c4130517dff9c5e70f Mon Sep 17 00:00:00 2001 From: Filip Maj Date: Sat, 29 Apr 2017 20:30:54 -0400 Subject: [PATCH] Added a "silent" option for LuaEngine calls. More content instance work. Full classpath now used for zones. --- FFXIVClassic Map Server/PacketProcessor.cs | 4 +- FFXIVClassic Map Server/WorldManager.cs | 79 ++++++++-- FFXIVClassic Map Server/actors/area/Area.cs | 7 +- .../actors/area/PrivateArea.cs | 6 +- .../actors/area/PrivateAreaContent.cs | 56 ++++++- FFXIVClassic Map Server/actors/area/Zone.cs | 31 +++- .../actors/chara/Character.cs | 10 +- .../actors/chara/npc/Npc.cs | 6 +- .../actors/chara/player/Player.cs | 7 +- .../actors/director/Director.cs | 6 +- .../actors/group/ContentGroup.cs | 25 +++- FFXIVClassic Map Server/actors/quest/Quest.cs | 4 +- FFXIVClassic Map Server/lua/LuaEngine.cs | 47 ++++-- .../send/Actor/SetActorPositionPacket.cs | 23 ++- sql/server_zones.sql | 138 +++++++++--------- 15 files changed, 313 insertions(+), 136 deletions(-) diff --git a/FFXIVClassic Map Server/PacketProcessor.cs b/FFXIVClassic Map Server/PacketProcessor.cs index 16d29482..783dfba0 100644 --- a/FFXIVClassic Map Server/PacketProcessor.cs +++ b/FFXIVClassic Map Server/PacketProcessor.cs @@ -120,9 +120,9 @@ namespace FFXIVClassic_Map_Server LangaugeCodePacket langCode = new LangaugeCodePacket(subpacket.data); session = mServer.AddSession(subpacket.header.targetId); - LuaEngine.GetInstance().CallLuaFunction(session.GetActor(), session.GetActor(), "onBeginLogin"); + LuaEngine.GetInstance().CallLuaFunction(session.GetActor(), session.GetActor(), "onBeginLogin", true); Server.GetWorldManager().DoZoneIn(session.GetActor(), true, 0x1); - LuaEngine.GetInstance().CallLuaFunction(session.GetActor(), session.GetActor(), "onLogin"); + LuaEngine.GetInstance().CallLuaFunction(session.GetActor(), session.GetActor(), "onLogin", true); session.languageCode = langCode.languageCode; break; //Unknown - Happens a lot at login, then once every time player zones diff --git a/FFXIVClassic Map Server/WorldManager.cs b/FFXIVClassic Map Server/WorldManager.cs index e619888b..047ec221 100644 --- a/FFXIVClassic Map Server/WorldManager.cs +++ b/FFXIVClassic Map Server/WorldManager.cs @@ -68,7 +68,7 @@ namespace FFXIVClassic_Map_Server id, zoneName, regionId, - className, + classPath, dayMusic, nightMusic, battleMusic, @@ -450,7 +450,7 @@ namespace FFXIVClassic_Map_Server player.SendMessage(0x20, "", "Doing Seamless Zone Change"); - LuaEngine.GetInstance().CallLuaFunction(player, newZone, "onZoneIn"); + LuaEngine.GetInstance().CallLuaFunction(player, newZone, "onZoneIn", true); } //Adds a second zone to pull actors from. Used for an improved seamless zone change. @@ -470,7 +470,7 @@ namespace FFXIVClassic_Map_Server player.SendMessage(0x20, "", "Merging Zones"); - LuaEngine.GetInstance().CallLuaFunction(player, mergedZone, "onZoneIn"); + LuaEngine.GetInstance().CallLuaFunction(player, mergedZone, "onZoneIn", true); } //Checks all seamless bounding boxes in region to see if player needs to merge or zonechange @@ -574,6 +574,8 @@ namespace FFXIVClassic_Map_Server return; } + player.playerSession.LockUpdates(true); + Area oldZone = player.zone; //Remove player from currentZone if transfer else it's login if (player.zone != null) @@ -594,6 +596,16 @@ namespace FFXIVClassic_Map_Server player.positionZ = spawnZ; player.rotation = spawnRotation; + //Delete content if have + if (player.currentContentGroup != null) + { + player.currentContentGroup.RemoveMember(player.actorId); + player.SetCurrentContentGroup(null, player); + + if (oldZone is PrivateAreaContent) + ((PrivateAreaContent)oldZone).CheckDestroy(); + } + //Send packets player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId), true, false); player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x10), true, false); @@ -601,11 +613,13 @@ namespace FFXIVClassic_Map_Server player.playerSession.ClearInstance(); player.SendInstanceUpdate(); + player.playerSession.LockUpdates(false); + //Send "You have entered an instance" if it's a Private Area if (newArea is PrivateArea) player.SendGameMessage(GetActor(), 34108, 0x20); - LuaEngine.GetInstance().CallLuaFunction(player, newArea, "onZoneIn"); + LuaEngine.GetInstance().CallLuaFunction(player, newArea, "onZoneIn", true); } //Moves actor within zone to spawn position @@ -648,6 +662,55 @@ namespace FFXIVClassic_Map_Server } } + //Moves actor to new zone, and sends packets to spawn at the given coords. + public void DoZoneChangeContent(Player player, PrivateAreaContent contentArea, float spawnX, float spawnY, float spawnZ, float spawnRotation, ushort spawnType = SetActorPositionPacket.SPAWNTYPE_WARP_DUTY) + { + //Content area was null + if (contentArea == null) + { + Program.Log.Debug("Request to change to content area not on this server by: {0}.", player.customDisplayName); + return; + } + + player.playerSession.LockUpdates(true); + + Area oldZone = player.zone; + //Remove player from currentZone if transfer else it's login + if (player.zone != null) + { + oldZone.RemoveActorFromZone(player); + } + + contentArea.AddActorToZone(player); + + //Update player actor's properties + player.zoneId = contentArea.GetParentZone().actorId; + + player.privateArea = contentArea.GetPrivateAreaName(); + player.privateAreaType = contentArea.GetPrivateAreaType(); + player.zone = contentArea; + player.positionX = spawnX; + player.positionY = spawnY; + player.positionZ = spawnZ; + player.rotation = spawnRotation; + + //Send "You have entered an instance" if it's a Private Area + player.SendGameMessage(GetActor(), 34108, 0x20); + + //Send packets + player.playerSession.QueuePacket(DeleteAllActorsPacket.BuildPacket(player.actorId), true, false); + player.playerSession.QueuePacket(_0xE2Packet.BuildPacket(player.actorId, 0x10), true, false); + player.SendZoneInPackets(this, spawnType); + player.playerSession.ClearInstance(); + player.SendInstanceUpdate(); + + player.playerSession.LockUpdates(false); + + + + LuaEngine.GetInstance().CallLuaFunction(player, contentArea, "onZoneIn", true); + } + //Session started, zone into world public void DoZoneIn(Player player, bool isLogin, ushort spawnType) { @@ -683,7 +746,7 @@ namespace FFXIVClassic_Map_Server player.playerSession.LockUpdates(false); - LuaEngine.GetInstance().CallLuaFunction(player, playerArea, "onZoneIn"); + LuaEngine.GetInstance().CallLuaFunction(player, playerArea, "onZoneIn", true); } public void ReloadZone(uint zoneId) @@ -743,12 +806,6 @@ namespace FFXIVClassic_Map_Server } } - public void CreateContentArea(String scriptPath) - { - LuaScript script = LuaEngine.LoadScript(scriptPath); - - } - public bool SendGroupInit(Session session, ulong groupId) { if (mContentGroups.ContainsKey(groupId)) diff --git a/FFXIVClassic Map Server/actors/area/Area.cs b/FFXIVClassic Map Server/actors/area/Area.cs index 1f060e63..25350da7 100644 --- a/FFXIVClassic Map Server/actors/area/Area.cs +++ b/FFXIVClassic Map Server/actors/area/Area.cs @@ -45,8 +45,8 @@ namespace FFXIVClassic_Map_Server.Actors protected List[,] mActorBlock; LuaScript areaScript; - - public Area(uint id, string zoneName, ushort regionId, string className, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid) + + public Area(uint id, string zoneName, ushort regionId, string classPath, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid) : base(id) { @@ -66,7 +66,8 @@ namespace FFXIVClassic_Map_Server.Actors this.customDisplayName = "_areaMaster"; this.actorName = String.Format("_areaMaster@{0:X5}",id<<8); - this.className = className; + this.classPath = classPath; + this.className = classPath.Substring(classPath.LastIndexOf("/") + 1); numXBlocks = (maxX - minX) / boundingGridSize; numYBlocks = (maxY - minY) / boundingGridSize; diff --git a/FFXIVClassic Map Server/actors/area/PrivateArea.cs b/FFXIVClassic Map Server/actors/area/PrivateArea.cs index fee2e52d..d5f653bc 100644 --- a/FFXIVClassic Map Server/actors/area/PrivateArea.cs +++ b/FFXIVClassic Map Server/actors/area/PrivateArea.cs @@ -17,8 +17,8 @@ namespace FFXIVClassic_Map_Server.actors.area private string privateAreaName; private uint privateAreaType; - public PrivateArea(Zone parent, uint id, string className, string privateAreaName, uint privateAreaType, ushort bgmDay, ushort bgmNight, ushort bgmBattle) - : base(id, parent.zoneName, parent.regionId, className, bgmDay, bgmNight, bgmBattle, parent.isIsolated, parent.isInn, parent.canRideChocobo, parent.canStealth, true) + public PrivateArea(Zone parent, uint id, string classPath, string privateAreaName, uint privateAreaType, ushort bgmDay, ushort bgmNight, ushort bgmBattle) + : base(id, parent.zoneName, parent.regionId, classPath, bgmDay, bgmNight, bgmBattle, parent.isIsolated, parent.isInn, parent.canRideChocobo, parent.canStealth, true) { this.parentZone = parent; this.zoneName = parent.zoneName; @@ -49,7 +49,7 @@ namespace FFXIVClassic_Map_Server.actors.area string realClassName = className.Substring(className.LastIndexOf("/") + 1); - lParams = LuaUtils.CreateLuaParamList("/Area/PrivateArea" + path, false, true, zoneName, privateAreaName, privateAreaType, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false); + lParams = LuaUtils.CreateLuaParamList(classPath, false, true, zoneName, privateAreaName, privateAreaType, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, false, false, false); ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, realClassName, lParams).DebugPrintSubPacket(); return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, realClassName, lParams); } diff --git a/FFXIVClassic Map Server/actors/area/PrivateAreaContent.cs b/FFXIVClassic Map Server/actors/area/PrivateAreaContent.cs index bec669f6..e82727e7 100644 --- a/FFXIVClassic Map Server/actors/area/PrivateAreaContent.cs +++ b/FFXIVClassic Map Server/actors/area/PrivateAreaContent.cs @@ -1,4 +1,8 @@ -using System; +using FFXIVClassic_Map_Server.actors.director; +using FFXIVClassic_Map_Server.actors.group; +using FFXIVClassic_Map_Server.Actors; +using FFXIVClassic_Map_Server.lua; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -6,11 +10,55 @@ using System.Threading.Tasks; namespace FFXIVClassic_Map_Server.actors.area { + class PrivateAreaContent : PrivateArea { - public PrivateAreaContent(Zone parent, uint id, string className, string privateAreaName, uint privateAreaType) - : base(parent, id, className, privateAreaName, privateAreaType, 0, 0, 0) - { + private Director currentDirector; + private ContentGroup currentContentGroup; + private bool isContentFinished = false; + + public static PrivateAreaContent CreateContentArea(String scriptPath) + { + return null; } + + public PrivateAreaContent(Zone parent, string classPath, string privateAreaName, uint privateAreaType, Director director, Player contentStarter) //TODO: Make it a list + : base(parent, parent.actorId, classPath, privateAreaName, privateAreaType, 0, 0, 0) + { + currentDirector = director; + currentContentGroup = Server.GetWorldManager().CreateContentGroup(director); + LuaEngine.GetInstance().CallLuaFunction(contentStarter, this, "onCreate", false, currentContentGroup, currentDirector); + } + + public Director GetContentDirector() + { + return currentDirector; + } + + public ContentGroup GetContentGroup() + { + return currentContentGroup; + } + + public void ContentFinished() + { + isContentFinished = true; + } + + public void CheckDestroy() + { + if (isContentFinished) + { + bool noPlayersLeft = true; + foreach (Actor a in mActorList.Values) + { + if (a is Player) + noPlayersLeft = false; + } + if (noPlayersLeft) + GetParentZone().DeleteContentArea(this); + } + } + } } diff --git a/FFXIVClassic Map Server/actors/area/Zone.cs b/FFXIVClassic Map Server/actors/area/Zone.cs index 81fc0c3a..0f26abfb 100644 --- a/FFXIVClassic Map Server/actors/area/Zone.cs +++ b/FFXIVClassic Map Server/actors/area/Zone.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using FFXIVClassic_Map_Server.actors.director; namespace FFXIVClassic_Map_Server.actors.area { @@ -17,9 +18,10 @@ namespace FFXIVClassic_Map_Server.actors.area { Dictionary> privateAreas = new Dictionary>(); Dictionary> contentAreas = new Dictionary>(); + Object contentAreasLock = new Object(); - public Zone(uint id, string zoneName, ushort regionId, string className, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid) - : base(id, zoneName, regionId, className, bgmDay, bgmNight, bgmBattle, isIsolated, isInn, canRideChocobo, canStealth, isInstanceRaid) + public Zone(uint id, string zoneName, ushort regionId, string classPath, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid) + : base(id, zoneName, regionId, classPath, bgmDay, bgmNight, bgmBattle, isIsolated, isInn, canRideChocobo, canStealth, isInstanceRaid) { } @@ -54,7 +56,7 @@ namespace FFXIVClassic_Map_Server.actors.area bool isEntranceDesion = false; List lParams; - lParams = LuaUtils.CreateLuaParamList("/Area/Zone/" + className, false, true, zoneName, "", -1, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, true, isInstanceRaid, isEntranceDesion); + lParams = LuaUtils.CreateLuaParamList(classPath, false, true, zoneName, "", -1, canRideChocobo ? (byte)1 : (byte)0, canStealth, isInn, false, false, false, true, isInstanceRaid, isEntranceDesion); return ActorInstantiatePacket.BuildPacket(actorId, playerActorId, actorName, className, lParams); } @@ -112,9 +114,30 @@ namespace FFXIVClassic_Map_Server.actors.area return mActorList[id]; } - public void CreateContentArea() + public PrivateAreaContent CreateContentArea(Player starterPlayer, string areaClassPath, string contentScript, string areaName, string directorName) { + lock (contentAreasLock) + { + Director director = CreateDirector(directorName); + if (director == null) + return null; + + if (!contentAreas.ContainsKey(areaName)) + contentAreas.Add(areaName, new List()); + PrivateAreaContent contentArea = new PrivateAreaContent(this, classPath, areaName, 1, director, starterPlayer); + contentAreas[areaName].Add(contentArea); + return contentArea; + } } + + public void DeleteContentArea(PrivateAreaContent area) + { + if (contentAreas.ContainsKey(area.GetPrivateAreaName())) + { + contentAreas[area.GetPrivateAreaName()].Remove(area); + } + } + } } diff --git a/FFXIVClassic Map Server/actors/chara/Character.cs b/FFXIVClassic Map Server/actors/chara/Character.cs index 0d6f6c00..88249669 100644 --- a/FFXIVClassic Map Server/actors/chara/Character.cs +++ b/FFXIVClassic Map Server/actors/chara/Character.cs @@ -54,6 +54,7 @@ namespace FFXIVClassic_Map_Server.Actors public CharaWork charaWork = new CharaWork(); public Group currentParty = null; + public ContentGroup currentContentGroup = null; public Character(uint actorID) : base(actorID) { @@ -88,9 +89,14 @@ namespace FFXIVClassic_Map_Server.Actors player.QueuePacket(SetActorQuestGraphicPacket.BuildPacket(player.actorId, actorId, graphicNum)); } - public void SetCurrentContentGroup(uint groupType, Player player = null) + public void SetCurrentContentGroup(ContentGroup group, Player player = null) { - charaWork.currentContentGroup = groupType; + if (group != null) + charaWork.currentContentGroup = group.GetTypeId(); + else + charaWork.currentContentGroup = 0; + + currentContentGroup = group; if (player != null) { diff --git a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs index 50a221b9..905921ce 100644 --- a/FFXIVClassic Map Server/actors/chara/npc/Npc.cs +++ b/FFXIVClassic Map Server/actors/chara/npc/Npc.cs @@ -83,7 +83,7 @@ namespace FFXIVClassic_Map_Server.Actors List lParams; Player player = Server.GetWorldManager().GetPCInWorld(playerActorId); - lParams = LuaEngine.GetInstance().CallLuaFunctionForReturn(player, this, "init"); + lParams = LuaEngine.GetInstance().CallLuaFunctionForReturn(player, this, "init", false); if (uniqueIdentifier.Equals("1")) { @@ -381,12 +381,12 @@ namespace FFXIVClassic_Map_Server.Actors public void DoOnActorSpawn(Player player) { - LuaEngine.GetInstance().CallLuaFunction(player, this, "onSpawn"); + LuaEngine.GetInstance().CallLuaFunction(player, this, "onSpawn", true); } public void Update(double deltaTime) { - LuaEngine.GetInstance().CallLuaFunction(null, this, "onUpdate", deltaTime); + LuaEngine.GetInstance().CallLuaFunction(null, this, "onUpdate", true, deltaTime); } //A party member list packet came, set the party diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index cbd1f8b0..759ba4b1 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -552,7 +552,10 @@ namespace FFXIVClassic_Map_Server.Actors director.GetSpawnPackets(actorId).DebugPrintPacket(); QueuePacket(director.GetSpawnPackets(actorId)); QueuePacket(director.GetInitPackets(actorId)); - } + } + + if (currentContentGroup != null) + currentContentGroup.SendGroupPackets(playerSession); } @@ -1526,7 +1529,7 @@ namespace FFXIVClassic_Map_Server.Actors public void Update(double delta) { - LuaEngine.GetInstance().CallLuaFunction(this, this, "OnUpdate", delta); + LuaEngine.GetInstance().CallLuaFunction(this, this, "OnUpdate", true, delta); } } diff --git a/FFXIVClassic Map Server/actors/director/Director.cs b/FFXIVClassic Map Server/actors/director/Director.cs index e1011a43..0d26358b 100644 --- a/FFXIVClassic Map Server/actors/director/Director.cs +++ b/FFXIVClassic Map Server/actors/director/Director.cs @@ -70,17 +70,17 @@ namespace FFXIVClassic_Map_Server.actors.director public void OnTalkEvent(Player player, Npc npc) { - LuaEngine.GetInstance().CallLuaFunction(player, this, "onTalkEvent", npc); + LuaEngine.GetInstance().CallLuaFunction(player, this, "onTalkEvent", false, npc); } public void OnCommandEvent(Player player, Command command) { - LuaEngine.GetInstance().CallLuaFunction(player, this, "onCommandEvent", command); + LuaEngine.GetInstance().CallLuaFunction(player, this, "onCommandEvent", false, command); } public void DoActorInit(string directorPath) { - List lparams = LuaEngine.GetInstance().CallLuaFunctionForReturn(null, this, "init"); + List lparams = LuaEngine.GetInstance().CallLuaFunctionForReturn(null, this, "init", false); if (lparams.Count == 1 && lparams[0].value is string) { diff --git a/FFXIVClassic Map Server/actors/group/ContentGroup.cs b/FFXIVClassic Map Server/actors/group/ContentGroup.cs index 5f84f2ab..2cabe0f9 100644 --- a/FFXIVClassic Map Server/actors/group/ContentGroup.cs +++ b/FFXIVClassic Map Server/actors/group/ContentGroup.cs @@ -40,7 +40,7 @@ namespace FFXIVClassic_Map_Server.actors.group members.Add(actor.actorId); if (actor is Character) { - ((Character)actor).SetCurrentContentGroup(GetTypeId()); + ((Character)actor).SetCurrentContentGroup(this); SendCurrentContentSync(actor); } SendGroupPacketsAll(members); @@ -50,16 +50,17 @@ namespace FFXIVClassic_Map_Server.actors.group { members.Remove(memberId); SendGroupPacketsAll(members); + CheckDestroy(); } public override List BuildMemberList(uint id) { List groupMembers = new List(); - groupMembers.Add(new GroupMember(id, -1, 0, false, true, Server.GetWorldManager().GetActorInWorld(id).customDisplayName)); + groupMembers.Add(new GroupMember(id, -1, 0, false, true, "")); foreach (uint charaId in members) { if (charaId != id) - groupMembers.Add(new GroupMember(charaId, -1, 0, false, true, Server.GetWorldManager().GetActorInWorld(charaId).customDisplayName)); + groupMembers.Add(new GroupMember(charaId, -1, 0, false, true, "")); } return groupMembers; } @@ -139,5 +140,23 @@ namespace FFXIVClassic_Map_Server.actors.group SendDeletePackets(members); } + + public void CheckDestroy() + { + bool foundSession = false; + foreach (uint memberId in members) + { + Session session = Server.GetServer().GetSession(memberId); + if (session != null) + { + foundSession = true; + break; + } + } + + if (!foundSession) + Server.GetWorldManager().DeleteContentGroup(groupIndex); + } + } } diff --git a/FFXIVClassic Map Server/actors/quest/Quest.cs b/FFXIVClassic Map Server/actors/quest/Quest.cs index 1d0fa50c..17a2e292 100644 --- a/FFXIVClassic Map Server/actors/quest/Quest.cs +++ b/FFXIVClassic Map Server/actors/quest/Quest.cs @@ -127,7 +127,7 @@ namespace FFXIVClassic_Map_Server.Actors public void DoCompletionCheck() { - List returned = LuaEngine.GetInstance().CallLuaFunctionForReturn(owner, this, "isObjectivesComplete"); + List returned = LuaEngine.GetInstance().CallLuaFunctionForReturn(owner, this, "isObjectivesComplete", true); if (returned != null && returned.Count >= 1 && returned[0].typeID == 3) { owner.SendDataPacket("attention", Server.GetWorldManager().GetActor(), "", 25225, (object)GetQuestId()); @@ -137,7 +137,7 @@ namespace FFXIVClassic_Map_Server.Actors public void DoAbandon() { - LuaEngine.GetInstance().CallLuaFunctionForReturn(owner, this, "onAbandonQuest"); + LuaEngine.GetInstance().CallLuaFunctionForReturn(owner, this, "onAbandonQuest", true); owner.SendGameMessage(owner, Server.GetWorldManager().GetActor(), 25236, 0x20, (object)GetQuestId()); } diff --git a/FFXIVClassic Map Server/lua/LuaEngine.cs b/FFXIVClassic Map Server/lua/LuaEngine.cs index 5b2cbf44..b051edc5 100644 --- a/FFXIVClassic Map Server/lua/LuaEngine.cs +++ b/FFXIVClassic Map Server/lua/LuaEngine.cs @@ -23,6 +23,7 @@ namespace FFXIVClassic_Map_Server.lua { const string FILEPATH_PLAYER = "./scripts/player.lua"; const string FILEPATH_ZONE = "./scripts/unique/{0}/zone.lua"; + const string FILEPATH_CONTENT = "./scripts/content/{0}.lua"; const string FILEPATH_COMMANDS = "./scripts/commands/{0}.lua"; const string FILEPATH_DIRECTORS = "./scripts/directors/{0}.lua"; const string FILEPATH_NPCS = "./scripts/unique/{0}/{1}/{2}.lua"; @@ -138,6 +139,10 @@ namespace FFXIVClassic_Map_Server.lua { return String.Format(FILEPATH_DIRECTORS, ((Director)target).GetScriptPath()); } + else if (target is PrivateAreaContent) + { + return String.Format(FILEPATH_CONTENT, ((PrivateAreaContent)target).GetPrivateAreaName()); + } else if (target is Area) { return String.Format(FILEPATH_ZONE, ((Area)target).zoneName); @@ -152,7 +157,7 @@ namespace FFXIVClassic_Map_Server.lua return ""; } - private List CallLuaFunctionNpcForReturn(Player player, Npc target, string funcName, params object[] args) + private List CallLuaFunctionNpcForReturn(Player player, Npc target, string funcName, bool optional, params object[] args) { object[] args2 = new object[args.Length + (player == null ? 1 : 2)]; Array.Copy(args, 0, args2, (player == null ? 1 : 2), args.Length); @@ -200,7 +205,7 @@ namespace FFXIVClassic_Map_Server.lua return lparams; } - private void CallLuaFunctionNpc(Player player, Npc target, string funcName, params object[] args) + private void CallLuaFunctionNpc(Player player, Npc target, string funcName, bool optional, params object[] args) { object[] args2 = new object[args.Length + (player == null ? 1:2)]; Array.Copy(args, 0, args2, (player == null ? 1 : 2), args.Length); @@ -257,11 +262,11 @@ namespace FFXIVClassic_Map_Server.lua } } - public List CallLuaFunctionForReturn(Player player, Actor target, string funcName, params object[] args) + public List CallLuaFunctionForReturn(Player player, Actor target, string funcName, bool optional, params object[] args) { //Need a seperate case for NPCs cause that child/parent thing. if (target is Npc) - return CallLuaFunctionNpcForReturn(player, (Npc)target, funcName, args); + return CallLuaFunctionNpcForReturn(player, (Npc)target, funcName, optional, args); object[] args2 = new object[args.Length + (player == null ? 1 : 2)]; Array.Copy(args, 0, args2, (player == null ? 1 : 2), args.Length); @@ -286,22 +291,41 @@ namespace FFXIVClassic_Map_Server.lua } else { - SendError(player, String.Format("Could not find function '{0}' for actor {1}.", funcName, target.GetName())); + if (!optional) + SendError(player, String.Format("Could not find function '{0}' for actor {1}.", funcName, target.GetName())); } } else { - SendError(player, String.Format("Could not find script for actor {0}.", target.GetName())); + if (!optional) + SendError(player, String.Format("Could not find script for actor {0}.", target.GetName())); } return null; } - public void CallLuaFunction(Player player, Actor target, string funcName, params object[] args) + public List CallLuaFunctionForReturn(string path, string funcName, bool optional, params object[] args) + { + string luaPath = path; + LuaScript script = LoadScript(luaPath); + if (script != null) + { + if (!script.Globals.Get(funcName).IsNil()) + { + //Run Script + DynValue result = script.Call(script.Globals[funcName], args); + List lparams = LuaUtils.CreateLuaParamList(result); + return lparams; + } + } + return null; + } + + public void CallLuaFunction(Player player, Actor target, string funcName, bool optional, params object[] args) { //Need a seperate case for NPCs cause that child/parent thing. if (target is Npc) { - CallLuaFunctionNpc(player, (Npc)target, funcName, args); + CallLuaFunctionNpc(player, (Npc)target, funcName, optional, args); return; } @@ -322,12 +346,13 @@ namespace FFXIVClassic_Map_Server.lua } else { - SendError(player, String.Format("Could not find function '{0}' for actor {1}.", funcName, target.GetName())); + if (!optional) + SendError(player, String.Format("Could not find function '{0}' for actor {1}.", funcName, target.GetName())); } } else { - if (!(target is Area)) + if (!(target is Area) && !optional) SendError(player, String.Format("Could not find script for actor {0}.", target.GetName())); } } @@ -344,7 +369,7 @@ namespace FFXIVClassic_Map_Server.lua ResolveResume(null, coroutine, value); } else - CallLuaFunction(player, target, "onEventStarted", LuaUtils.CreateLuaParamObjectList(lparams)); + CallLuaFunction(player, target, "onEventStarted", false, LuaUtils.CreateLuaParamObjectList(lparams)); } private DynValue ResolveResume(Player player, Coroutine coroutine, DynValue value) diff --git a/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs b/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs index 0df2192a..fce26791 100644 --- a/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs +++ b/FFXIVClassic Map Server/packets/send/Actor/SetActorPositionPacket.cs @@ -10,20 +10,15 @@ namespace FFXIVClassic_Map_Server.packets.send.actor public const ushort OPCODE = 0x00CE; public const uint PACKET_SIZE = 0x48; - public const uint SPAWNTYPE_FADEIN = 0; - public const uint SPAWNTYPE_PLAYERWAKE = 1; - public const uint SPAWNTYPE_WARP_DUTY = 2; - public const uint SPAWNTYPE_WARP2 = 3; - public const uint SPAWNTYPE_WARP3 = 4; - public const uint SPAWNTYPE_WARP_YELLOW = 5; - public const uint SPAWNTYPE_WARP_DUTY2 = 6; - public const uint SPAWNTYPE_WARP_LIGHT = 7; - - public const float INNPOS_X = 157.550003f; - public const float INNPOS_Y = 000.000000f; - public const float INNPOS_Z = 165.050003f; - public const float INNPOS_ROT = -1.530000f; - + public const ushort SPAWNTYPE_FADEIN = 0; + public const ushort SPAWNTYPE_PLAYERWAKE = 1; + public const ushort SPAWNTYPE_WARP_DUTY = 2; + public const ushort SPAWNTYPE_WARP2 = 3; + public const ushort SPAWNTYPE_WARP3 = 4; + public const ushort SPAWNTYPE_WARP_YELLOW = 5; + public const ushort SPAWNTYPE_WARP_DUTY2 = 6; + public const ushort SPAWNTYPE_WARP_LIGHT = 7; + public static SubPacket BuildPacket(uint sourceActorID, uint targetActorID, uint actorId, float x, float y, float z, float rotation, ushort spawnType, bool isZoningPlayer) { byte[] data = new byte[PACKET_SIZE-0x20]; diff --git a/sql/server_zones.sql b/sql/server_zones.sql index e74a3d8a..c1ccda9a 100644 --- a/sql/server_zones.sql +++ b/sql/server_zones.sql @@ -18,7 +18,7 @@ CREATE TABLE `server_zones` ( `placeName` varchar(255) NOT NULL, `serverIp` varchar(32) NOT NULL, `serverPort` int(10) unsigned NOT NULL, - `className` varchar(30) NOT NULL, + `classPath` varchar(255) NOT NULL, `dayMusic` smallint(6) unsigned DEFAULT '0', `nightMusic` smallint(6) unsigned DEFAULT '0', `battleMusic` smallint(6) unsigned DEFAULT '0', @@ -34,90 +34,90 @@ CREATE TABLE `server_zones` ( -- Records -- ---------------------------- INSERT INTO `server_zones` VALUES ('0', '0', null, '--', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('128', '101', 'sea0Field01', 'Lower La Noscea', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '60', '60', '21', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('129', '101', 'sea0Field02', 'Western La Noscea', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '60', '60', '21', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('130', '101', 'sea0Field03', 'Eastern La Noscea', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '60', '60', '21', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('131', '101', 'sea0Dungeon01', 'Mistbeard Cove', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('132', '101', 'sea0Dungeon02', 'Cassiopeia Hollow', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('133', '101', 'sea0Town01', 'Limsa Lominsa', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '59', '59', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('134', '202', 'sea0Market01', 'Market Wards', '127.0.0.1', '1989', 'ZoneMasterMarketSeaS0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('135', '101', 'sea0Field04', 'Upper La Noscea', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '60', '60', '21', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('128', '101', 'sea0Field01', 'Lower La Noscea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '60', '60', '21', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('129', '101', 'sea0Field02', 'Western La Noscea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '60', '60', '21', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('130', '101', 'sea0Field03', 'Eastern La Noscea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '60', '60', '21', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('131', '101', 'sea0Dungeon01', 'Mistbeard Cove', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('132', '101', 'sea0Dungeon02', 'Cassiopeia Hollow', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('133', '101', 'sea0Town01', 'Limsa Lominsa', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '59', '59', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('134', '202', 'sea0Market01', 'Market Wards', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterMarketSeaS0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('135', '101', 'sea0Field04', 'Upper La Noscea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '60', '60', '21', '0', '0', '1', '0', '0'); INSERT INTO `server_zones` VALUES ('137', '101', null, 'U\'Ghamaro Mines', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('138', '101', null, 'La Noscea', '127.0.0.1', '1989', '', '60', '60', '21', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('139', '112', 'sea0Field01a', 'The Cieldalaes', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('139', '112', 'sea0Field01a', 'The Cieldalaes', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('140', '101', null, 'Sailors Ward', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('141', '101', 'sea0Field01a', 'Lower La Noscea', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '60', '60', '21', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('143', '102', 'roc0Field01', 'Coerthas Central Highlands', '127.0.0.1', '1989', 'ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('144', '102', 'roc0Field02', 'Coerthas Eastern Highlands', '127.0.0.1', '1989', 'ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('145', '102', 'roc0Field03', 'Coerthas Eastern Lowlands', '127.0.0.1', '1989', 'ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('141', '101', 'sea0Field01a', 'Lower La Noscea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '60', '60', '21', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('143', '102', 'roc0Field01', 'Coerthas Central Highlands', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('144', '102', 'roc0Field02', 'Coerthas Eastern Highlands', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('145', '102', 'roc0Field03', 'Coerthas Eastern Lowlands', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); INSERT INTO `server_zones` VALUES ('146', '102', null, 'Coerthas', '127.0.0.1', '1989', '', '55', '55', '15', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('147', '102', 'roc0Field04', 'Coerthas Central Lowlands', '127.0.0.1', '1989', 'ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('148', '102', 'roc0Field05', 'Coerthas Western Highlands', '127.0.0.1', '1989', 'ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('150', '103', 'fst0Field01', 'Central Shroud', '127.0.0.1', '1989', 'ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('151', '103', 'fst0Field02', 'East Shroud', '127.0.0.1', '1989', 'ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('152', '103', 'fst0Field03', 'North Shroud', '127.0.0.1', '1989', 'ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('153', '103', 'fst0Field04', 'West Shroud', '127.0.0.1', '1989', 'ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('154', '103', 'fst0Field05', 'South Shroud', '127.0.0.1', '1989', 'ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('155', '103', 'fst0Town01', 'Gridania', '127.0.0.1', '1989', 'ZoneMasterFstF0', '51', '51', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('147', '102', 'roc0Field04', 'Coerthas Central Lowlands', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('148', '102', 'roc0Field05', 'Coerthas Western Highlands', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterRocR0', '55', '55', '15', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('150', '103', 'fst0Field01', 'Central Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('151', '103', 'fst0Field02', 'East Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('152', '103', 'fst0Field03', 'North Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('153', '103', 'fst0Field04', 'West Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('154', '103', 'fst0Field05', 'South Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '52', '52', '13', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('155', '103', 'fst0Town01', 'Gridania', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '51', '51', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('156', '103', null, 'The Black Shroud', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('157', '103', 'fst0Dungeon01', 'The Mun-Tuy Cellars', '127.0.0.1', '1989', 'ZoneMasterFstF0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('158', '103', 'fst0Dungeon02', 'The Tam-Tara Deepcroft', '127.0.0.1', '1989', 'ZoneMasterFstF0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('159', '103', 'fst0Dungeon03', 'The Thousand Maws of Toto-Rak', '127.0.0.1', '1989', 'ZoneMasterFstF0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('160', '204', 'fst0Market01', 'Market Wards', '127.0.0.1', '1989', 'ZoneMasterMarketFstF0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('157', '103', 'fst0Dungeon01', 'The Mun-Tuy Cellars', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('158', '103', 'fst0Dungeon02', 'The Tam-Tara Deepcroft', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('159', '103', 'fst0Dungeon03', 'The Thousand Maws of Toto-Rak', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('160', '204', 'fst0Market01', 'Market Wards', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterMarketFstF0', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('161', '103', null, 'Peasants Ward', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('162', '103', 'fst0Field01a', 'Central Shroud', '127.0.0.1', '1989', 'ZoneMasterFstF0', '52', '52', '13', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('164', '106', 'fst0Battle01', 'Central Shroud', '127.0.0.1', '1989', 'ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('165', '106', 'fst0Battle02', 'Central Shroud', '127.0.0.1', '1989', 'ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('166', '106', 'fst0Battle03', 'Central Shroud', '127.0.0.1', '1989', 'ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('167', '106', 'fst0Battle04', 'Central Shroud', '127.0.0.1', '1989', 'ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('168', '106', 'fst0Battle05', 'Central Shroud', '127.0.0.1', '1989', 'ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('170', '104', 'wil0Field01', 'Central Thanalan', '127.0.0.1', '1989', 'ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('171', '104', 'wil0Field02', 'Eastern Thanalan', '127.0.0.1', '1989', 'ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('172', '104', 'wil0Field03', 'Western Thanalan', '127.0.0.1', '1989', 'ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('173', '104', 'wil0Field04', 'Northern Thanalan', '127.0.0.1', '1989', 'ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('174', '104', 'wil0Field05', 'Southern Thanalan', '127.0.0.1', '1989', 'ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('175', '104', 'wil0Town01', 'Ul\'dah', '127.0.0.1', '1989', 'ZoneMasterWilW0', '66', '66', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('176', '104', 'wil0Dungeon01', 'Nanawa Mines', '127.0.0.1', '1989', 'ZoneMasterWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('177', '207', '_jail', '-', '127.0.0.1', '1989', 'ZoneMasterJail', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('178', '104', 'wil0Dungeon02', 'Copperbell Mines', '127.0.0.1', '1989', 'ZoneMasterWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('162', '103', 'fst0Field01a', 'Central Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '52', '52', '13', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('164', '106', 'fst0Battle01', 'Central Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('165', '106', 'fst0Battle02', 'Central Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('166', '106', 'fst0Battle03', 'Central Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('167', '106', 'fst0Battle04', 'Central Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('168', '106', 'fst0Battle05', 'Central Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleFstF0', '0', '0', '13', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('170', '104', 'wil0Field01', 'Central Thanalan', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('171', '104', 'wil0Field02', 'Eastern Thanalan', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('172', '104', 'wil0Field03', 'Western Thanalan', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('173', '104', 'wil0Field04', 'Northern Thanalan', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('174', '104', 'wil0Field05', 'Southern Thanalan', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterWilW0', '68', '68', '25', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('175', '104', 'wil0Town01', 'Ul\'dah', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterWilW0', '66', '66', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('176', '104', 'wil0Dungeon01', 'Nanawa Mines', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('177', '207', '_jail', '-', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterJail', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('178', '104', 'wil0Dungeon02', 'Copperbell Mines', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('179', '104', null, 'Thanalan', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('180', '205', 'wil0Market01', 'Market Wards', '127.0.0.1', '1989', 'ZoneMasterMarketWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('180', '205', 'wil0Market01', 'Market Wards', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterMarketWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('181', '104', null, 'Merchants Ward', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('182', '104', null, 'Central Thanalan', '127.0.0.1', '1989', '', '68', '68', '25', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('184', '107', 'wil0Battle01', 'Ul\'dah', '127.0.0.1', '1989', 'ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('185', '107', 'wil0Battle01', 'Ul\'dah', '127.0.0.1', '1989', 'ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('186', '104', 'wil0Battle02', 'Ul\'dah', '127.0.0.1', '1989', 'ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('187', '104', 'wil0Battle03', 'Ul\'dah', '127.0.0.1', '1989', 'ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('188', '104', 'wil0Battle04', 'Ul\'dah', '127.0.0.1', '1989', 'ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('190', '105', 'lak0Field01', 'Mor Dhona', '127.0.0.1', '1989', 'ZoneMasterLakL0', '49', '49', '11', '0', '0', '1', '0', '0'); -INSERT INTO `server_zones` VALUES ('192', '111', 'ocn0Battle01', 'Rhotano Sea', '127.0.0.1', '1989', 'ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('193', '111', 'ocn0Battle02', 'Rhotano Sea', '127.0.0.1', '1989', 'ZoneMasterBattleOcnO0', '7', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('194', '111', 'ocn0Battle03', 'Rhotano Sea', '127.0.0.1', '1989', 'ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('195', '111', 'ocn0Battle04', 'Rhotano Sea', '127.0.0.1', '1989', 'ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('196', '111', 'ocn0Battle05', 'Rhotano Sea', '127.0.0.1', '1989', 'ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('198', '111', 'ocn0Battle06', 'Rhotano Sea', '127.0.0.1', '1989', 'ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('200', '805', 'ocn0Cruise01', 'Strait of Merlthor', '127.0.0.1', '1989', 'ZoneMasterCruiseOcnO2', '65', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('184', '107', 'wil0Battle01', 'Ul\'dah', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('185', '107', 'wil0Battle01', 'Ul\'dah', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('186', '104', 'wil0Battle02', 'Ul\'dah', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('187', '104', 'wil0Battle03', 'Ul\'dah', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('188', '104', 'wil0Battle04', 'Ul\'dah', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleWilW0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('190', '105', 'lak0Field01', 'Mor Dhona', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterLakL0', '49', '49', '11', '0', '0', '1', '0', '0'); +INSERT INTO `server_zones` VALUES ('192', '111', 'ocn0Battle01', 'Rhotano Sea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('193', '111', 'ocn0Battle02', 'Rhotano Sea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleOcnO0', '7', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('194', '111', 'ocn0Battle03', 'Rhotano Sea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('195', '111', 'ocn0Battle04', 'Rhotano Sea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('196', '111', 'ocn0Battle05', 'Rhotano Sea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('198', '111', 'ocn0Battle06', 'Rhotano Sea', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterBattleOcnO0', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('200', '805', 'ocn0Cruise01', 'Strait of Merlthor', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterCruiseOcnO2', '65', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('201', '111', null, '-', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('204', '101', 'sea0Field02a', 'Western La Noscea', '127.0.0.1', '1989', '', '60', '60', '21', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('205', '101', 'sea0Field03a', 'Eastern La Noscea', '127.0.0.1', '1989', '', '60', '60', '21', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('206', '103', 'fst0Town01a', 'Gridania', '127.0.0.1', '1989', 'ZoneMasterFstF0', '51', '51', '13', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('207', '103', 'fst0Field03a', 'North Shroud', '127.0.0.1', '1989', 'ZoneMasterFstF0', '52', '52', '13', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('208', '103', 'fst0Field05a', 'South Shroud', '127.0.0.1', '1989', 'ZoneMasterFstF0', '52', '52', '13', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('209', '104', 'wil0Town01a', 'Ul\'dah', '127.0.0.1', '1989', 'ZoneMasterWilW0', '66', '66', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('206', '103', 'fst0Town01a', 'Gridania', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '51', '51', '13', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('207', '103', 'fst0Field03a', 'North Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '52', '52', '13', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('208', '103', 'fst0Field05a', 'South Shroud', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterFstF0', '52', '52', '13', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('209', '104', 'wil0Town01a', 'Ul\'dah', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterWilW0', '66', '66', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('210', '104', null, 'Eastern Thanalan', '127.0.0.1', '1989', '', '68', '68', '25', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('211', '104', null, 'Western Thanalan', '127.0.0.1', '1989', '', '68', '68', '25', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('230', '101', 'sea0Town01a', 'Limsa Lominsa', '127.0.0.1', '1989', 'ZoneMasterSeaS0', '59', '59', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('230', '101', 'sea0Town01a', 'Limsa Lominsa', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS0', '59', '59', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('231', '102', 'roc0Dungeon01', 'Dzemael Darkhold', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('232', '202', 'sea0Office01', 'Maelstrom Command', '127.0.0.1', '1989', 'ZoneMasterOfficeSeaS0', '3', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('233', '205', 'wil0Office01', 'Hall of Flames', '127.0.0.1', '1989', 'ZoneMasterOfficeWilW0', '4', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('234', '204', 'fst0Office01', 'Adders\' Nest', '127.0.0.1', '1989', 'ZoneMasterOfficeFstF0', '2', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('232', '202', 'sea0Office01', 'Maelstrom Command', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterOfficeSeaS0', '3', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('233', '205', 'wil0Office01', 'Hall of Flames', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterOfficeWilW0', '4', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('234', '204', 'fst0Office01', 'Adders\' Nest', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterOfficeFstF0', '2', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('235', '101', null, 'Shposhae', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('236', '101', 'sea1Field01', 'Locke\'s Lie', '127.0.0.1', '1989', 'ZoneMasterSeaS1', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('236', '101', 'sea1Field01', 'Locke\'s Lie', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterSeaS1', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('237', '101', null, 'Turtleback Island', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('238', '103', 'fst0Field04', 'Thornmarch', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('239', '102', null, 'The Howling Eye', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('240', '104', 'wil0Field05a', 'The Bowl of Embers', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('244', '209', 'prv0Inn01', 'Inn Room', '127.0.0.1', '1989', 'ZoneMasterPrvI0', '61', '61', '0', '0', '1', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('244', '209', 'prv0Inn01', 'Inn Room', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterPrvI0', '61', '61', '0', '0', '1', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('245', '102', 'roc0Dungeon02', 'The Aurum Vale', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('246', '104', null, 'Cutter\'s Cry', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('247', '103', null, 'North Shroud', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); @@ -130,7 +130,7 @@ INSERT INTO `server_zones` VALUES ('253', '102', null, 'The Aurum Vale', '127.0. INSERT INTO `server_zones` VALUES ('254', '104', null, 'Cutter\'s Cry', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('255', '104', null, 'Cutter\'s Cry', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('256', '102', null, 'The Howling Eye', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('257', '109', 'roc1Field01', 'Rivenroad', '127.0.0.1', '1989', 'ZoneMasterRocR1', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('257', '109', 'roc1Field01', 'Rivenroad', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterRocR1', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('258', '103', null, 'North Shroud', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('259', '103', null, 'North Shroud', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('260', '101', null, 'Western La Noscea', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); @@ -139,8 +139,8 @@ INSERT INTO `server_zones` VALUES ('262', '104', null, 'Eastern Thanalan', '127. INSERT INTO `server_zones` VALUES ('263', '104', null, 'Eastern Thanalan', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('264', '105', 'lak0Field01', 'Transmission Tower', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '1', '0', '0'); INSERT INTO `server_zones` VALUES ('265', '104', null, 'The Bowl of Embers', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('266', '105', 'lak0Field01a', 'Mor Dhona', '127.0.0.1', '1989', 'ZoneMasterLakL0', '49', '49', '11', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('267', '109', 'roc1Field02', 'Rivenroad', '127.0.0.1', '1989', 'ZoneMasterRocR1', '0', '0', '0', '0', '0', '0', '0', '0'); -INSERT INTO `server_zones` VALUES ('268', '109', 'roc1Field03', 'Rivenroad', '127.0.0.1', '1989', 'ZoneMasterRocR1', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('266', '105', 'lak0Field01a', 'Mor Dhona', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterLakL0', '49', '49', '11', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('267', '109', 'roc1Field02', 'Rivenroad', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterRocR1', '0', '0', '0', '0', '0', '0', '0', '0'); +INSERT INTO `server_zones` VALUES ('268', '109', 'roc1Field03', 'Rivenroad', '127.0.0.1', '1989', '/Area/Zone/ZoneMasterRocR1', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('269', '101', null, 'Locke\'s Lie', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0'); INSERT INTO `server_zones` VALUES ('270', '101', null, 'Turtleback Island', '127.0.0.1', '1989', '', '0', '0', '0', '0', '0', '0', '0', '0');