more work on AI, added odb for object id(should hopefully fix object id duplicates), fixed tons of bugs

This commit is contained in:
Light2
2014-03-10 00:33:34 +01:00
parent 072106b6a6
commit 807025ec0b
47 changed files with 1365 additions and 212 deletions
+12 -1
View File
@@ -268,7 +268,7 @@ public class CommandService implements INetworkDispatch {
}
if(!success) {
if(!success && attacker.getClient() != null) {
IoSession session = attacker.getClient().getSession();
CommandEnqueueRemove commandRemove = new CommandEnqueueRemove(attacker.getObjectId(), actionCounter);
session.write(new ObjControllerMessage(0x0B, commandRemove).serialize());
@@ -305,6 +305,17 @@ public class CommandService implements INetworkDispatch {
if (command == null)
return;
if(command instanceof CombatCommand) {
CombatCommand command2;
try {
command2 = (CombatCommand) command.clone();
processCombatCommand((CreatureObject) actor, target, command2, 0, "");
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return;
}
core.scriptService.callScript("scripts/commands/", command.getCommandName(), "run", core, actor, target, commandArgs);
}