diff options
Diffstat (limited to 'internal/admin/static/mobeditor.js')
| -rw-r--r-- | internal/admin/static/mobeditor.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/internal/admin/static/mobeditor.js b/internal/admin/static/mobeditor.js index c2364c8..463af0a 100644 --- a/internal/admin/static/mobeditor.js +++ b/internal/admin/static/mobeditor.js @@ -121,12 +121,10 @@ var MOB_SECTIONS = [ ] }, { - id: 'on_kill', label: 'On Kill', labelHint: '(fired when this mob is defeated or its task completes — additive over drops)', path: 'on_kill', isArray: true, fullWidth: true, interactionStyle: true, interScope: 'inline', + id: 'on_kill', label: 'On Kill', labelHint: '(fired when this mob is defeated or its task completes — additive over drops)', path: 'on_kill', isArray: true, fullWidth: true, interactionStyle: true, detect: function(d) { return d.on_kill && Array.isArray(d.on_kill); }, fields: [ ['item_id', 'Item ID', 'search', '(optional — only fires if you wield this weapon when the mob is defeated)', '', null, 'items'], - ['condition', 'Condition', 'inter_cond'], - ['action', 'Action', 'inter_act'], ] }, ]; @@ -813,8 +811,9 @@ function saveMob() { var cleanedCond = ie_cleanCondition(dataItem.condition); if (cleanedCond) item.condition = cleanedCond; } - if (dataItem.action && typeof dataItem.action === 'object') { - item.action = dataItem.action; + if (dataItem.lock) item.lock = true; + if (Array.isArray(dataItem.steps)) { + item.steps = dataItem.steps.map(ie_cleanStep).filter(function(s) { return s && Object.keys(s).length > 0; }); } } if (Object.keys(item).length > 0) arr.push(item); |
