| | |
| | | public static ushort clientMapId { get; private set; }
|
| | | public static Dungeon dungeonInfo { get; set; } |
| | | |
| | | static bool exitClientDungeonSymbol = false; |
| | | |
| | | const string OFFLINEMAPRECORD = "OfflineMapRecord"; |
| | | |
| | | public static event Action<HB214_tagMCCuntomFBPrizeInfo> onReceiveCustomDropItme; |
| | | |
| | | static Action<Dungeon, bool> clientCustomDungeonResult; |
| | | |
| | |
| | | { |
| | | DTC0102_tagCDBPlayer.switchAccountEvent += Reset; |
| | | DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk; |
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish; |
| | | }
|
| | |
|
| | | public static void SetClientDungeon(bool value, ushort mapId) |
| | |
| | | ClearClientDataMapSymbol();
|
| | | } |
| | | }
|
| | |
|
| | | public static void RequestSettleClientDungeon(int mapId, int lineId)
|
| | | {
|
| | | var pak = new CB109_tagCMGiveCustomFBPrize();
|
| | | pak.MapID = (uint)mapId;
|
| | | pak.FuncLineID = (ushort)lineId;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | } |
| | | |
| | | public static void RequestStartClientDungeon(int mapId, int lineId, Action<Dungeon, bool> callBack)
|
| | | {
|
| | |
| | | {
|
| | | var pak = new CA233_tagCMClientExitCustomScene();
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | } |
| | | |
| | | public static void ReceiveCustomItems(HB214_tagMCCuntomFBPrizeInfo package)
|
| | | {
|
| | | if (onReceiveCustomDropItme != null)
|
| | | {
|
| | | onReceiveCustomDropItme(package);
|
| | | }
|
| | | } |
| | | |
| | | public static void ReceiveStartCustomDungeonResult(HB216_tagMCStartCustomSceneResult package)
|
| | |
| | | PlayerDatas.Instance.extersion.pkState = 0;
|
| | | ModelCenter.Instance.GetModel<DungeonModel>().ResetBufData();
|
| | |
|
| | | exitClientDungeonSymbol = true;
|
| | |
|
| | | PlayerDatas.Instance.baseData.MapID = PlayerDatas.Instance.baseData.mainServerMapIdRecord;
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | |
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true,
|
| | | refreshPlayerDatas = true
|
| | | refreshPlayerDatas = true,
|
| | | exitClientMap = true,
|
| | | });
|
| | | } |
| | | |
| | |
| | | RequestStartClientDungeon(dungeonInfo.mapId, dungeonInfo.lineId, null);
|
| | | }
|
| | | } |
| | | |
| | | private static void OnStageLoadFinish()
|
| | | {
|
| | | if (exitClientDungeonSymbol)
|
| | | {
|
| | | RequestExitClientDungeon();
|
| | | }
|
| | |
|
| | | exitClientDungeonSymbol = false;
|
| | | }
|
| | |
|
| | | private static void Reset() |
| | | { |