*Revert ea1e16a, should be done globally and not simply here

This commit is contained in:
TheManii 2016-04-09 12:35:29 -07:00
parent 06606c5f01
commit c38fbc0c09
6 changed files with 108 additions and 108 deletions

View File

@ -24,7 +24,7 @@ namespace FFXIVClassic_Lobby_Server
class CommandProcessor class CommandProcessor
{ {
private Dictionary<uint, ConnectedPlayer> mConnectedPlayerList; private Dictionary<uint, ConnectedPlayer> mConnectedPlayerList;
private static WorldManager mWorldManager = Server.getWorldManager(); private static WorldManager mWorldManager = Server.GetWorldManager();
private static Dictionary<uint, Item> gamedataItems = Server.getItemGamedataList(); private static Dictionary<uint, Item> gamedataItems = Server.getItemGamedataList();
// For the moment, this is the only predefined item // For the moment, this is the only predefined item

View File

@ -188,7 +188,7 @@ namespace FFXIVClassic_Lobby_Server
subpacket.debugPrintSubPacket(); subpacket.debugPrintSubPacket();
client.queuePacket(_0x2Packet.buildPacket(player.actorID), true, false); client.queuePacket(_0x2Packet.buildPacket(player.actorID), true, false);
Server.getWorldManager().DoLogin(player.getActor()); Server.GetWorldManager().DoLogin(player.getActor());
break; break;
@ -267,7 +267,7 @@ namespace FFXIVClassic_Lobby_Server
if (ownerActor == null) if (ownerActor == null)
{ {
//Is it a instance actor? //Is it a instance actor?
ownerActor = Server.getWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner); ownerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner);
if (ownerActor == null) if (ownerActor == null)
{ {
//Is it a Director? //Is it a Director?
@ -298,7 +298,7 @@ namespace FFXIVClassic_Lobby_Server
Actor updateOwnerActor = Server.getStaticActors(player.getActor().eventCurrentOwner); Actor updateOwnerActor = Server.getStaticActors(player.getActor().eventCurrentOwner);
if (updateOwnerActor == null) if (updateOwnerActor == null)
{ {
updateOwnerActor = Server.getWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner); updateOwnerActor = Server.GetWorldManager().GetActorInWorld(player.getActor().eventCurrentOwner);
if (player.getActor().currentDirector != null && player.getActor().eventCurrentOwner == player.getActor().currentDirector.actorId) if (player.getActor().currentDirector != null && player.getActor().eventCurrentOwner == player.getActor().currentDirector.actorId)
updateOwnerActor = player.getActor().currentDirector; updateOwnerActor = player.getActor().currentDirector;

View File

@ -330,7 +330,7 @@ namespace FFXIVClassic_Lobby_Server
#endregion #endregion
public static WorldManager getWorldManager() public static WorldManager GetWorldManager()
{ {
return mWorldManager; return mWorldManager;
} }

View File

@ -49,7 +49,7 @@ namespace FFXIVClassic_Map_Server.Actors
{ {
List<LuaParam> lParams; List<LuaParam> lParams;
Player player = Server.getWorldManager().GetPCInWorld(playerActorId); Player player = Server.GetWorldManager().GetPCInWorld(playerActorId);
lParams = LuaEngine.doActorOnInstantiate(player, this); lParams = LuaEngine.doActorOnInstantiate(player, this);
if (lParams == null) if (lParams == null)

View File

@ -703,34 +703,34 @@ namespace FFXIVClassic_Map_Server.Actors
{ {
if (msgParams.Length == 0) if (msgParams.Length == 0)
{ {
queuePacket(GameMessagePacket.buildPacket(Server.getWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log)); queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log));
} }
else else
queuePacket(GameMessagePacket.buildPacket(Server.getWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams))); queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, sourceActor.actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams)));
} }
public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, params object[] msgParams) public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, params object[] msgParams)
{ {
if (msgParams.Length == 0) if (msgParams.Length == 0)
queuePacket(GameMessagePacket.buildPacket(Server.getWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log)); queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log));
else else
queuePacket(GameMessagePacket.buildPacket(Server.getWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams))); queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, log, LuaUtils.createLuaParamList(msgParams)));
} }
public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams) public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, string customSender, params object[] msgParams)
{ {
if (msgParams.Length == 0) if (msgParams.Length == 0)
queuePacket(GameMessagePacket.buildPacket(Server.getWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log)); queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log));
else else
queuePacket(GameMessagePacket.buildPacket(Server.getWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log, LuaUtils.createLuaParamList(msgParams))); queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, customSender, log, LuaUtils.createLuaParamList(msgParams)));
} }
public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams) public void sendGameMessage(Actor textIdOwner, ushort textId, byte log, uint displayId, params object[] msgParams)
{ {
if (msgParams.Length == 0) if (msgParams.Length == 0)
queuePacket(GameMessagePacket.buildPacket(Server.getWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log)); queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log));
else else
queuePacket(GameMessagePacket.buildPacket(Server.getWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log, LuaUtils.createLuaParamList(msgParams))); queuePacket(GameMessagePacket.buildPacket(Server.GetWorldManager().GetActor().actorId, actorId, textIdOwner.actorId, textId, displayId, log, LuaUtils.createLuaParamList(msgParams)));
} }
public void broadcastWorldMessage(ushort worldMasterId, params object[] msgParams) public void broadcastWorldMessage(ushort worldMasterId, params object[] msgParams)

View File

@ -43,7 +43,7 @@ namespace FFXIVClassic_Map_Server.lua
Script script = new Script(); Script script = new Script();
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" }; ((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors; script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getWorldManager().GetActor; script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata; script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
script.DoFile(luaPath); script.DoFile(luaPath);
DynValue result = script.Call(script.Globals["onInstantiate"], target); DynValue result = script.Call(script.Globals["onInstantiate"], target);
@ -82,9 +82,9 @@ namespace FFXIVClassic_Map_Server.lua
{ {
Script script = new Script(); Script script = new Script();
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" }; ((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
script.Globals["getWorldManager"] = (Func<WorldManager>)Server.getWorldManager; script.Globals["getWorldManager"] = (Func<WorldManager>)Server.GetWorldManager;
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors; script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getWorldManager().GetActor; script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata; script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
script.DoFile(luaPath); script.DoFile(luaPath);
@ -125,9 +125,9 @@ namespace FFXIVClassic_Map_Server.lua
{ {
Script script = new Script(); Script script = new Script();
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" }; ((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
script.Globals["getWorldManager"] = (Func<WorldManager>)Server.getWorldManager; script.Globals["getWorldManager"] = (Func<WorldManager>)Server.GetWorldManager;
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors; script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getWorldManager().GetActor; script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata; script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
script.DoFile(luaPath); script.DoFile(luaPath);
@ -158,9 +158,9 @@ namespace FFXIVClassic_Map_Server.lua
{ {
Script script = new Script(); Script script = new Script();
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" }; ((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
script.Globals["getWorldManager"] = (Func<WorldManager>)Server.getWorldManager; script.Globals["getWorldManager"] = (Func<WorldManager>)Server.GetWorldManager;
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors; script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getWorldManager().GetActor; script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata; script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
script.DoFile(luaPath); script.DoFile(luaPath);
@ -175,9 +175,9 @@ namespace FFXIVClassic_Map_Server.lua
{ {
Script script = new Script(); Script script = new Script();
((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" }; ((ScriptLoaderBase)script.Options.ScriptLoader).ModulePaths = new string[] { "./scripts/?", "./scripts/?.lua" };
script.Globals["getWorldManager"] = (Func<WorldManager>)Server.getWorldManager; script.Globals["getWorldManager"] = (Func<WorldManager>)Server.GetWorldManager;
script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors; script.Globals["getStaticActor"] = (Func<string, Actor>)Server.getStaticActors;
script.Globals["getWorldMaster"] = (Func<Actor>)Server.getWorldManager().GetActor; script.Globals["getWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata; script.Globals["getItemGamedata"] = (Func<uint, Item>)Server.getItemGamedata;
script.DoFile(FILEPATH_PLAYER); script.DoFile(FILEPATH_PLAYER);