//------------------------------------------------------------------------- // event: 响应消息 public string evMainSendMsg(IEbEvent ev) { EbEvent2 <int, List <object> > evt = ev as EbEvent2 <int, List <object> >; int msg_id = evt.param1; List <object> vec_param = evt.param2; bool handled = false; List <INodeTrigger> trigger_list = mNode.getTriggerList(); foreach (var i in trigger_list) { handled = i.handleMsg(msg_id, vec_param); if (handled) { break; } } // 检查有没有触发器触发 if (handled) { mNode.getNodeMgr().IsHandledMsg = true; } return(""); }
//------------------------------------------------------------------------- // event: 响应消息 public string evMainSendMsg(IEbEvent ev) { EbEvent2 <int, List <object> > evt = ev as EbEvent2 <int, List <object> >; int msg_id = evt.param1; List <object> msg_paramlist = evt.param2; if (mNodeServerScript != null) { mNodeServerScript.onServerMsg(mNode, 0, msg_id, 0, msg_paramlist); } else if (mNodeClientScript != null) { mNodeClientScript.onClientMsg(msg_id, msg_paramlist); } return(""); }
//------------------------------------------------------------------------- // event: 响应消息 public string evMainSendMsg(IEbEvent ev) { EbEvent2 <int, List <object> > evt = ev as EbEvent2 <int, List <object> >; int msg_id = evt.param1; List <object> vec_param = evt.param2; List <INodeTrigger> trigger_list = mNode._getTriggerList(); foreach (var i in trigger_list) { i.handleMsg(msg_id, vec_param); } // 检查有没有触发器触发 foreach (var i in trigger_list) { if (i.triggered()) { mNode.getNodeMgr().IsHandledMsg = true; } } return(""); }