From e16e0373d632b7e053923f794bc053778927d60a Mon Sep 17 00:00:00 2001 From: Waverunner Date: Mon, 4 Aug 2014 16:39:43 -0400 Subject: [PATCH] Added system err print for combat commands being considered regular scripted commands Removed loading of buildout objects temporarily to help make it easier to resolve major loading crashes Commands that are considered combat commands by the client but are using regular command format will work, it'll just give an error. They should be moved to the proper combat command format. --- options.cfg | 2 +- src/services/command/CommandService.java | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/options.cfg b/options.cfg index 328c74b1..c96f5a3b 100644 --- a/options.cfg +++ b/options.cfg @@ -1,5 +1,5 @@ LOAD.SNAPSHOT_OBJECTS=1 -LOAD.BUILDOUT_OBJECTS=1 +LOAD.BUILDOUT_OBJECTS=0 #LOAD.BUILDOUT_ONLY_FOR="dathomir" LOAD.RESOURCE.SYSTEM=1 diff --git a/src/services/command/CommandService.java b/src/services/command/CommandService.java index aa514a51..a8cd0210 100644 --- a/src/services/command/CommandService.java +++ b/src/services/command/CommandService.java @@ -451,8 +451,13 @@ 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() + ".py")) { - core.scriptService.callScript("scripts/commands/combat/", command.getCommandName(), "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 { + 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/combat/", command.getCommandName().toLowerCase(), "run", core, attacker, target, ""); + } } boolean success = true;