Merge conflict resolve

This commit is contained in:
CharonInferar
2014-08-09 18:17:01 +02:00
1452 changed files with 14987 additions and 14349 deletions
+14 -6
View File
@@ -95,11 +95,14 @@ public class CommandService implements INetworkDispatch {
return false;
}
TangibleObject weapon = (TangibleObject) core.objectService.getObject(actor.getWeaponId());
// Causes this service method to return with false after equipping a rifle, not allowing to unequip it anymore
// because the client seems to consider rifles invalidweapons for an unkown reason
if (weapon != null && weapon instanceof WeaponObject && ((WeaponObject) weapon).getWeaponType() == command.getInvalidWeapon()) {
return false;
}
// TangibleObject weapon = (TangibleObject) core.objectService.getObject(actor.getWeaponId());
//
// if (weapon != null && weapon instanceof WeaponObject && ((WeaponObject) weapon).getWeaponType() == command.getInvalidWeapon()) {
// return false;
// }
for (long state : command.getInvalidStates()) {
if ((actor.getStateBitmask() & state) == state) {
@@ -716,8 +719,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;