mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
renamed ability to battlecommand
- moved spells to scripts/commands/ - added aoe range field to battle_commands.sql - changed AttackState to use character's onAttack
This commit is contained in:
parent
6f5a480cbd
commit
6c74222b68
23 changed files with 658 additions and 335 deletions
|
@ -191,12 +191,16 @@ namespace FFXIVClassic_Map_Server.lua
|
|||
return (int)res.Number;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Program.Log.Error($"LuaEngine.CallLuaStatusEffectFunction [{effect.GetName()}] Unable to find script {path}");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int CallLuaAbilityFunction(Character actor, Ability ability, string folder, string functionName, params object[] args)
|
||||
public static int CallLuaBattleCommandFunction(Character actor, BattleCommand command, string folder, string functionName, params object[] args)
|
||||
{
|
||||
string path = $"./scripts/{folder}/{ability.name}.lua";
|
||||
string path = $"./scripts/commands/{folder}/{command.name}.lua";
|
||||
|
||||
if (File.Exists(path))
|
||||
{
|
||||
|
@ -208,7 +212,7 @@ namespace FFXIVClassic_Map_Server.lua
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Program.Log.Error($"LuaEngine.CallLuaSpellFunction [{functionName}] {e.Message}");
|
||||
Program.Log.Error($"LuaEngine.CallLuaBattleCommandFunction [{functionName}] {e.Message}");
|
||||
}
|
||||
DynValue res = new DynValue();
|
||||
|
||||
|
@ -219,6 +223,10 @@ namespace FFXIVClassic_Map_Server.lua
|
|||
return (int)res.Number;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Program.Log.Error($"LuaEngine.CallLuaBattleCommandFunction [{command.name}] Unable to find script {path}");
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue