| | |
| | | using UnityEngine; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | //using ILCrossBinding; |
| | | |
| | | public class PackageRegedit |
| | | { |
| | |
| | | |
| | | public static void Init() |
| | | { |
| | | // 登记相应的数据体及对应的数据转逻辑类 |
| | | // 登记相应的数据体及对应的数据转逻辑类(去重后) |
| | | Register(typeof(H0102_tagCDBPlayer), typeof(DTC0102_tagCDBPlayer)); |
| | | Register(typeof(HA004_tagServerDateTime), typeof(DTCA004_tagServerDateTime)); |
| | | Register(typeof(HA005_tagOpenServerDay), typeof(DTCA005_tagOpenServerDay)); |
| | |
| | | Register(typeof(HA921_tagUpdatePlayerNameResult), typeof(DTCA921_tagUpdatePlayerNameResult)); |
| | | Register(typeof(H3202_tagServerResponse), typeof(DTC3202_tagServerResponse)); |
| | | Register(typeof(HA130_tagMCViewBillboardRet), typeof(DTCA130_tagMCViewBillboardRet)); |
| | | |
| | | Register(typeof(HB420_tagMCTurnFightState), typeof(DTCB420_tagMCTurnFightState)); |
| | | Register(typeof(HB421_tagMCTurnFightObjAction), typeof(DTCB421_tagMCTurnFightObjAction)); |
| | | Register(typeof(HB422_tagMCTurnFightObjDead), typeof(DTCB422_tagMCTurnFightObjDead)); |
| | | Register(typeof(HB423_tagMCTurnFightObjReborn), typeof(DTCB423_tagMCTurnFightObjReborn)); |
| | | Register(typeof(HB424_tagSCTurnFightInit), typeof(DTCB424_tagSCTurnFightInit)); |
| | | Register(typeof(HB425_tagSCTurnFightReportSign), typeof(DTCB425_tagSCTurnFightReportSign)); |
| | | Register(typeof(HB430_tagSCTurnFightReport), typeof(DTCB430_tagSCTurnFightReport)); |
| | | Register(typeof(H0407_tagNPCDisappear), typeof(DTC0407_tagNPCDisappear)); |
| | | Register(typeof(H0423_tagObjPropertyRefreshView), typeof(DTC0423_tagObjPropertyRefreshView)); |
| | | Register(typeof(H0604_tagUseSkillAttack), typeof(DTC0604_tagUseSkillAttack)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //主工程注册封包 |
| | | public static void Register(Type _pack, Type _business) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public static bool Contain(ushort _cmd) |
| | | { |
| | | return packToBusinessTable.ContainsKey(_cmd); |
| | |
| | | try |
| | | { |
| | | //执行主工程的封包 |
| | | if (packToBusinessTable.ContainsKey(_package.cmd)) |
| | | if (packToBusinessTable.ContainsKey(_package.cmd) && BattleManager.Instance.IsCanDistributePackage(_package)) |
| | | packToBusinessTable[_package.cmd].Done(_package); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |