修订条件判定问题

This commit is contained in:
yuexin 2020-12-11 16:01:55 +08:00
parent 803cd93982
commit c8681265eb

View File

@ -58,11 +58,12 @@ let TriggerManager = {
this._triggermap.set(tg_type, tobj); this._triggermap.set(tg_type, tobj);
} }
let cobj = this._conditionmap.get(tg_cond); let key = Number(tg_cond) + '|' + Number(tg_cond_decide) + '|' + tg_cond_v;
let cobj = this._conditionmap.get(key);
if (!cobj) { if (!cobj) {
cobj = new Condition(); cobj = new Condition();
cobj.init(tg_cond, tg_cond_decide, tg_cond_v); cobj.init(tg_cond, tg_cond_decide, tg_cond_v);
this._conditionmap.set(tg_cond, cobj); this._conditionmap.set(key, cobj);
} }
let obj = new TriggerCtrl(); let obj = new TriggerCtrl();