//#-------------------------------------------------------------------------- // game logic protocal //#-------------------------------------------------------------------------- private void onRecv_FromUG_AnsDB_GameInfo(int next_index, string sQuery, MSG.AnsDB rd) { if (next_index == 10000) { return; // 맨마지막. } m_User.m_eEUserGPS = EUserGPS.eUGPS_DB_LOAD; string tbl = sQuery.Substring(9); if (tbl == "tbl_user") { nProtoExcel.s_tbl_user user = nNWM.nDummy.NetEventPlugin.Deserialize <nProtoExcel.s_tbl_user>(rd.Result); NetLog("[Recv:table]" + nUtil.jDumper.NamedDump(user, m_MSG.m_PacketLogType)); m_User.add_tbl_user(user); } m_User.Inc_tbl_record(tbl, next_index); if (next_index == 9999) { NetLog("[Recv:finish]" + tbl + " "); return; } var db = new MSG.ReqDB { Seq = rd.Seq + 1, Query = sQuery, }; db.Params.Add(new MSG.DBIn { Type = MSG.DBIn.TypeEnum.Int, Value = next_index.ToString(), }); send_to_MSG(db, sQuery + ":" + next_index.ToString()); return; } //onRecv_FromUG_AnsDB_GameInfo
public override void OnRecv_FromMSG(MSG.AnsDB rd) /** 디비 요청에 대한 응답 메시지 */ { int next_index = rd.ReturnCode; if (next_index == 19999) { NetLog("[Recv]AnsDB =>" + nNWM.nUtil.jDumper.NamedDump(rd, m_MSG.m_PacketLogType), true); NetError("SERVER ERROR next_index=" + next_index); return; } string sQuery = rd.Query; if (sQuery == "ug_game") { var ug2x = Deserialize <nProtoUG.UserGateServer_Client>(rd.Result); NetLog("[Recv:ug] " /* + ug2x.GetType().ToString() + " , " */ + ug2x.type.ToString(), true); nNWM.nDummy.NetEventArg arg; //(this,ug2x); arg.plugin = this; arg.recvData = ug2x; m_MSG.CallNetEvent("UserGateServer_Client", ug2x.type.ToString(), arg); return; } //if (sQuery == "ug_game") if (sQuery == "ug_echo") { NetLog("[Recv]AnsDB.ug_echo : " + rd.Result); return; } // "GameInfo.tbl_user" 으로 DB 테이블 요청시 사용하는경우 if (sQuery.Contains("GameInfo.")) { onRecv_FromUG_AnsDB_GameInfo(next_index, sQuery, rd); return; } //if (sQuery.Contains("GameInfo.")) NetWarning("[Recv]AnsDB => Unkown data: " + nNWM.nUtil.jDumper.NamedDump(rd, m_MSG.m_PacketLogType)); }
//#-------------------------------------------------------------------------- // game logic protocal //#-------------------------------------------------------------------------- private void onRecv_FromUG_AnsDB_GameInfo(int next_index, string sQuery, MSG.AnsDB rd) { return; } //onRecv_FromUG_AnsDB_GameInfo
public override void OnRecv_FromMSG(MSG.AnsDB rd) /** 디비 요청에 대한 응답 메시지 */ { NetWarning("[Recv]AnsDB => Unkown data: " + nNWM.nUtil.jDumper.NamedDump(rd, m_MSG.m_PacketLogType)); }
abstract public void OnRecv_FromMSG(MSG.AnsError rd); /** 에러가 발생했을 경우의 처리 */ abstract public void OnRecv_FromMSG(MSG.AnsDB rd); /** 디비 요청에 대한 응답 메시지 */