mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-30 00:15:57 -04:00
Merge conflict resolve
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user