mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-15 00:07:39 -04:00
Added reuseTime cooldowns for objects not in table
This commit is contained in:
@@ -687,6 +687,8 @@ public class ObjectService implements INetworkDispatch {
|
||||
try {
|
||||
DatatableVisitor visitor = ClientFileManager.loadFile("datatables/timer/template_command_mapping.iff", DatatableVisitor.class);
|
||||
|
||||
boolean foundTemplate = false;
|
||||
|
||||
for (int i = 0; i < visitor.getRowCount(); i++) {
|
||||
if (visitor.getObject(i, 0) != null && ((String) (visitor.getObject(i, 0))).equalsIgnoreCase(object.getTemplate())) {
|
||||
String commandName = (String) visitor.getObject(i, 1);
|
||||
@@ -712,9 +714,19 @@ public class ObjectService implements INetworkDispatch {
|
||||
creature.addCooldown(cooldownGroup, object.getIntAttribute("reuse_time"));
|
||||
}
|
||||
|
||||
templateFound = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundTemplate) {
|
||||
if (creature.hasCooldown(object.getTemplate())) {
|
||||
return;
|
||||
}
|
||||
|
||||
creature.addCooldown(object.getTemplate(), object.getIntAttribute("reuse_time"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user