} //void FixedUpdate () //#-------------------------------------------------------------------------- // private member function //#-------------------------------------------------------------------------- void onRecvFromUG(nNWM.nDummy.NetEventPlugin plugin, MSG.MSGEvent e) { MSG.AnswerMessage ans = e.RecvMessage; switch (ans.Type) { case MSG.AnswerMessage.AnsType.Connect: //status = Status.Login; plugin.NetLog("[Recv:MSG] AnsConnect (Login Succeed)=>" + nNWM.nUtil.jDumper.NamedDump(ans.Connect, m_PacketLogType), true); plugin.OnRecv_FromMSG(ans.Connect); break; case MSG.AnswerMessage.AnsType.Info: plugin.NetLog("[Recv:MSG] AnsGameInfo ", true); // + System.BitConverter.ToString(ans.Info.GameInfo), true); plugin.OnRecv_FromMSG(ans.Info); break; case MSG.AnswerMessage.AnsType.Channel: plugin.NetLog("[Recv:MSG] AnsChannel", true); plugin.OnRecv_FromMSG(ans.Channel); break; case MSG.AnswerMessage.AnsType.AutoJoin: plugin.NetLog("[Recv:MSG] AnsAutoJoin ", true); plugin.OnRecv_FromMSG(ans.AutoJoin); break; case MSG.AnswerMessage.AnsType.LeaveGame: plugin.NetLog("[Recv:MSG] AnsLeaveGame", true); //plugin.m_CMD.Log(nNWM.nUtil.jDumper.NamedDump(ans.LeaveGame)); plugin.OnRecv_FromMSG(ans.LeaveGame); break; case MSG.AnswerMessage.AnsType.Close: plugin.NetLog("[Recv:MSG] AnsClose ", true); plugin.m_CMD.Log(nNWM.nUtil.jDumper.NamedDump(ans.Close)); plugin.OnRecv_FromMSG(ans.Close); break; case MSG.AnswerMessage.AnsType.Notice: plugin.NetLog("[Recv:MSG] AnsNotice =>" + nNWM.nUtil.jDumper.NamedDump(ans.Notice.Notices, m_PacketLogType), true); plugin.OnRecv_FromMSG(ans.Notice); break; case MSG.AnswerMessage.AnsType.DB: plugin.OnRecv_FromMSG(ans.DB); break; case MSG.AnswerMessage.AnsType.GameProtocol: //status = Status.InGame; //plugin.NetLog("[Recv:MSG] GameProtocol", true); //plugin.Log("Message => " + BitConverter.ToString(ans.GameProtocol.Buffer)); plugin.OnRecv_FromGameServer(ans.GameProtocol.Buffer); break; case MSG.AnswerMessage.AnsType.Error: plugin.NetError("[Recv:MSG] AnsError =>" + nNWM.nUtil.jDumper.NamedDump(ans.Error, nNWM.nUtil.jDumper.EDumpType.eALL)); plugin.OnRecv_FromMSG(ans.Error); break; default: plugin.NetError("[Recv:MSG] Unkown AnswerMessage =>" + nNWM.nUtil.jDumper.NamedDump(ans)); plugin.OnRecv_Unkown(ans); break; } } //void onRecvFromUG(MSGEvent e)
public void EnqueueRecvMessageEvent(AnswerMessage ans) { EnqueueEvent( (e) => e.InitToRecvMessage(ans) ); }