mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-03 16:21:52 +02:00
Added Gridania scripts and various others. Fixed error messages popping for scripts that may not use certain functions.
This commit is contained in:
parent
67928ee875
commit
5e926bf668
169 changed files with 1310 additions and 37 deletions
|
@ -335,7 +335,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier));
|
||||
|
||||
if (parent == null)
|
||||
if (parent == null && child == null)
|
||||
{
|
||||
LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", GetName()));
|
||||
return null;
|
||||
|
@ -363,9 +363,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier));
|
||||
|
||||
if (parent == null)
|
||||
if (parent == null && child == null)
|
||||
{
|
||||
LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", GetName()));
|
||||
//LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", GetName()));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -397,19 +397,19 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier)))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", zone.zoneName, className, uniqueIdentifier));
|
||||
|
||||
if (parent == null)
|
||||
if (parent == null && child == null)
|
||||
{
|
||||
LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", GetName()));
|
||||
//LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", GetName()));
|
||||
return;
|
||||
}
|
||||
|
||||
//Run Script
|
||||
if (child != null && !child.Globals.Get("onSpawn").IsNil())
|
||||
if (child != null && child.Globals["onSpawn"] != null)
|
||||
child.Call(child.Globals["onSpawn"], player, this);
|
||||
else if (!parent.Globals.Get("onSpawn").IsNil())
|
||||
else if (parent != null && parent.Globals["onSpawn"] != null)
|
||||
parent.Call(parent.Globals["onSpawn"], player, this);
|
||||
else
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue