| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HAB04_tagMCBossRebornInfo), typeof(DTCAB04_tagMCBossRebornInfo));
|
| | | Register(typeof(HA40B_tagGCPlayerJoinFamilyWarInfo), typeof(DTCA40B_tagGCPlayerJoinFamilyWarInfo));
|
| | | Register(typeof(HA319_tagMCPackDownloadRecord), typeof(DTCA319_tagMCPackDownloadRecord));
|
| | |
|
| | | Register(typeof(HAC0A_tagGCMultiRealmPointInfo), typeof(DTCAC0A_tagGCMultiRealmPointInfo));
|
| | | Register(typeof(HAC08_tagGCBossRebornPoint), typeof(DTCAC08_tagGCBossRebornPoint));
|
| | | Register(typeof(HAC07_tagGCBossRebornInfo), typeof(DTCAC07_tagGCBossRebornInfo));
|
| | | Register(typeof(HAB03_tagMCBossRebornPlayerInfo), typeof(DTCAB03_tagMCBossRebornPlayerInfo));
|
| | | Register(typeof(HAA11_tagMCSpringSaleInfo), typeof(DTCAA11_tagMCSpringSaleInfo));
|
| | | Register(typeof(HAA10_tagMCCostRebatePlayerInfo), typeof(DTCAA10_tagMCCostRebatePlayerInfo));
|
| | |
| | | Register(typeof(HAA14_tagMCXJSDRecharge), typeof(DTCAA14_tagMCXJSDRecharge));
|
| | | Register(typeof(HAA15_tagMCAllPeoplePartyInfo), typeof(DTCAA15_tagMCAllPeoplePartyInfo));
|
| | | #endregion
|
| | |
|
| | | #region 神兽
|
| | | Register(typeof(HA3C0_tagMCDogzInfo), typeof(DTCA3C0_tagMCDogzInfo));
|
| | | Register(typeof(HA3C1_tagMCDogzHelpbattleState), typeof(DTCA3C1_tagMCDogzHelpbattleState));
|
| | | #endregion
|
| | |
|
| | | }
|
| | |
|
| | | private static void Register(Type _pack, Type _business)
|
| | |
| | | var businessInstance = _business.Assembly.CreateInstance(_business.Name) as DtcBasic;
|
| | | if (packToBusinessTable.ContainsKey(packInstance.cmd))
|
| | | {
|
| | | DesignDebug.LogFormat("重复封包登记: {0}!", _pack.Name);
|
| | | DebugEx.LogFormat("重复封包登记: {0}!", _pack.Name);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DesignDebug.LogError(ex);
|
| | | DebugEx.LogError(ex);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | #if UNITY_EDITOR
|
| | | NetPkgCtl.AddNetPkg(vStr, NetPkgType.Server, string.Empty, string.Empty, null);
|
| | | DesignDebug.LogErrorFormat("C#层收到未登记的解包协议:{0},{1}", vCmdBytes[0].ToString("x2"), vCmdBytes[1].ToString("x2"));
|
| | | DebugEx.LogErrorFormat("C#层收到未登记的解包协议:{0},{1}", vCmdBytes[0].ToString("x2"), vCmdBytes[1].ToString("x2"));
|
| | | #endif
|
| | | }
|
| | | return null;
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | DesignDebug.LogError("收到未定义的解包协议:" + vBytes[0].ToString("x2").ToUpper() + "," + vBytes[1].ToString("x2").ToUpper());
|
| | | DebugEx.LogError("收到未定义的解包协议:" + vBytes[0].ToString("x2").ToUpper() + "," + vBytes[1].ToString("x2").ToUpper());
|
| | | }
|
| | | return vNetPackInst;
|
| | | }
|