Added specialLine scripts

This will greatly reduce the amount of duplicate combat command scripts.
This commit is contained in:
Ziggeh
2014-08-12 10:05:10 +02:00
parent 5f4f3d1132
commit cacd6292cf
+5 -2
View File
@@ -750,9 +750,12 @@ public class CommandService implements INetworkDispatch {
}
public void processCombatCommand(CreatureObject attacker, SWGObject target, CombatCommand command, int actionCounter, String commandArgs) {
if (FileUtilities.doesFileExist("scripts/commands/combat/" + command.getCommandName().toLowerCase() + ".py")) {
if (FileUtilities.doesFileExist("scripts/commands/combat/specialline/" + command.getSpecialLine().toLowerCase() + ".py"))
core.scriptService.callScript("scripts/commands/combat/specialline/", command.getSpecialLine().toLowerCase(), "setup", core, attacker, target, command);
if (FileUtilities.doesFileExist("scripts/commands/combat/" + command.getCommandName().toLowerCase() + ".py"))
core.scriptService.callScript("scripts/commands/combat/", command.getCommandName().toLowerCase(), "setup", core, attacker, target, command);
} else {
else {
if (FileUtilities.doesFileExist("scripts/commands/" + command.getCommandName().toLowerCase() + ".py")) {
System.err.print("Command " + command.getCommandName() + " is considered a combat command by the client but has a regular command script!");
core.scriptService.callScript("scripts/commands/", command.getCommandName().toLowerCase(), "run", core, attacker, target, "");