3个文件已删除
1 文件已重命名
19个文件已修改
1个文件已添加
| | |
| | | public static ushort clientMapId { get; private set; }
|
| | | public static Dungeon dungeonInfo { get; set; } |
| | | |
| | | static bool exitClientDungeonFlag = false; |
| | | |
| | | const string OFFLINEMAPRECORD = "OfflineMapRecord"; |
| | | |
| | | public static event Action<HB214_tagMCCuntomFBPrizeInfo> onReceiveCustomDropItme; |
| | |
| | | { |
| | | DTC0102_tagCDBPlayer.switchAccountEvent += Reset; |
| | | DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk; |
| | | StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish; |
| | | }
|
| | |
|
| | | public static void SetClientDungeon(bool value, ushort mapId) |
| | |
| | | }
|
| | | }
|
| | | clientCustomDungeonResult = null;
|
| | | }
|
| | |
|
| | | public static void GotoNormalClientDungeon(int clientMapId, int mapId, int lineId)
|
| | | {
|
| | | RequestStartClientDungeon(mapId, lineId, (dungeonInfo, isOk) =>
|
| | | {
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | if (hero != null)
|
| | | {
|
| | | hero.StopAll();
|
| | | }
|
| | |
|
| | | MapTransferUtility.Instance.Clear();
|
| | |
|
| | | SetClientDungeon(true, (ushort)mapId);
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = mapId,
|
| | | toLineId = 0,
|
| | | needEmpty = true,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true
|
| | | });
|
| | |
|
| | | PlayerDatas.Instance.baseData.mainServerMapIdRecord = PlayerDatas.Instance.baseData.MapID;
|
| | | PlayerDatas.Instance.baseData.MapID = (ushort)mapId;
|
| | | var attackMode = new C030A_tagCChangeAttackMode();
|
| | | attackMode.Mode = (byte)E_AttackMode.Peace;
|
| | | GameNetSystem.Instance.PushPackage(attackMode, ServerType.Main);
|
| | | });
|
| | | }
|
| | |
|
| | | public static void ExitNormalClientDungeon()
|
| | | {
|
| | | SetClientDungeon(false, 0);
|
| | | PlayerDatas.Instance.extersion.pkState = 0;
|
| | | ModelCenter.Instance.GetModel<DungeonModel>().ResetBufData();
|
| | |
|
| | | exitClientDungeonFlag = true;
|
| | |
|
| | | PlayerDatas.Instance.baseData.MapID = PlayerDatas.Instance.baseData.mainServerMapIdRecord;
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = PlayerDatas.Instance.baseData.MapID,
|
| | | toLineId = 0,
|
| | | needEmpty = true,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true,
|
| | | refreshPlayerDatas = true
|
| | | });
|
| | | } |
| | | |
| | | private static void FiveSecondEvent()
|
| | |
| | | }
|
| | | } |
| | | |
| | | private static void OnStageLoadFinish()
|
| | | {
|
| | | if (exitClientDungeonFlag)
|
| | | {
|
| | | RequestExitClientDungeon();
|
| | | }
|
| | |
|
| | | exitClientDungeonFlag = false;
|
| | | }
|
| | |
|
| | | private static void Reset() |
| | | { |
| | | isClientDungeon = false; |
| | |
| | | step = (int)step < (int)Step.Collect ? 1 : 2,
|
| | | npcTotal = npcTotal,
|
| | | };
|
| | | model.UpdateFakeDungeonMission(ClientHazyPreciousDungeon.DATAMAP, missionData);
|
| | | model.UpdateFakeDungeonMission(31190, missionData);
|
| | | }
|
| | |
|
| | | void UnloadAssets()
|
| | |
| | |
|
| | | void OnExitDungeon()
|
| | | {
|
| | | ClientHazyPreciousDungeon.RequestExit();
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | }
|
| | |
|
| | | private void BossShowCompletedEvent()
|
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | public class ClientPersonalBossDungeonStage : DungeonStage
|
| | | { |
| | | public override void Initialize()
|
| | | {
|
| | | base.Initialize();
|
| | | } |
| | | |
| | | public override void UnInitialize()
|
| | | {
|
| | | base.UnInitialize();
|
| | | } |
| | | } |
| File was renamed from System/Treasure/ClientTreasureDungeon.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 189ce34976654c34da06b3239c45076d |
| | | timeCreated: 1556000158 |
| | | guid: e0fe6b75e8e6ea3439251f799ba2d591 |
| | | timeCreated: 1558427783 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | WindowCenter.Instance.Open<ElderGodAngerWin>();
|
| | | }
|
| | | break;
|
| | | case ClientTreasureDungeon.Client_DataMap:
|
| | | case 4000:
|
| | | case TreasureModel.TREASURE_MAPID:
|
| | | WindowCenter.Instance.Open<TreasureDungeonMissionHintWin>();
|
| | | break;
|
| | |
| | | case HazyGrassModel.Client_ReikiGrassMapID:
|
| | | stage = stageGameObject.AddComponent<ClientHazyGrassStage>();
|
| | | break;
|
| | | case ClientTreasureDungeon.Client_DataMap:
|
| | | case 4000:
|
| | | stage = stageGameObject.AddComponent<ClientTreasureDungeonStage>();
|
| | | break;
|
| | | default:
|
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestExitDungeon", _m_RequestExitDungeon); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReceivePackage", _m_ReceivePackage); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestEnterClientDungeon", _m_RequestEnterClientDungeon); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestExitClientDungeon", _m_RequestExitClientDungeon); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "onPlayerInfoRefresh", _e_onPlayerInfoRefresh); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "onPlayerCountRefresh", _e_onPlayerCountRefresh); |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_RequestExitClientDungeon(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.HazyDemonKingModel gen_to_be_invoked = (Snxxz.UI.HazyDemonKingModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.RequestExitClientDungeon( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "ReceivePackage", _m_ReceivePackage); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshMapNpcCount", _m_RefreshMapNpcCount); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestEnterClientDungeon", _m_RequestEnterClientDungeon); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "RequestExitClientDungeon", _m_RequestExitClientDungeon); |
| | | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "onMapNpcCountRefresh", _e_onMapNpcCountRefresh); |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_RequestExitClientDungeon(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.HazyGrassModel gen_to_be_invoked = (Snxxz.UI.HazyGrassModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | |
| | | gen_to_be_invoked.RequestExitClientDungeon( ); |
| | | |
| | | |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | |
| | | var crossServerBossModel = ModelCenter.Instance.GetModel<CrossServerBossModel>();
|
| | | crossServerBossModel.RequestExit();
|
| | | break;
|
| | | case ClientTreasureDungeon.Client_DataMap:
|
| | | ClientTreasureDungeon.RequestExit();
|
| | | case 4000:
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | break;
|
| | | case ClientHazyPreciousDungeon.DATAMAP:
|
| | | ClientHazyPreciousDungeon.RequestExit();
|
| | | case 31190:
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | break;
|
| | | default:
|
| | | model.ExitCurrentDungeon();
|
| | |
| | | {
|
| | | switch (ClientDungeonStageUtility.clientMapId)
|
| | | {
|
| | | case ClientTreasureDungeon.Client_DataMap:
|
| | | ClientTreasureDungeon.RequestExit();
|
| | | case 4000:
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | break;
|
| | | }
|
| | | return;
|
| | |
| | | {
|
| | | if (ClientDungeonStageUtility.isClientDungeon)
|
| | | {
|
| | | ClientTreasureDungeon.RequestExit();
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | WindowCenter.Instance.Open<JadeDynastyDamageRankWin>();
|
| | | }
|
| | | break;
|
| | | case ClientHazyPreciousDungeon.DATAMAP:
|
| | | case 31190:
|
| | | if (!WindowCenter.Instance.IsOpen<DungeonMissionDetailsWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<DungeonMissionDetailsWin>();
|
| | |
| | | model.demonDungeonChallengeNext += ChallengeNextEvent;
|
| | |
|
| | | if (ClientDungeonStageUtility.isClientDungeon
|
| | | && ClientDungeonStageUtility.clientMapId == ClientTreasureDungeon.Client_DataMap)
|
| | | && ClientDungeonStageUtility.clientMapId == 4000)
|
| | | {
|
| | | treasureId = 101;
|
| | | }
|
| | |
| | | var dungeonId = 0;
|
| | | if (ClientDungeonStageUtility.isClientDungeon)
|
| | | {
|
| | | dungeonId = dungeonModel.GetDungeonId(ClientTreasureDungeon.Client_DataMap, 0);
|
| | | dungeonId = dungeonModel.GetDungeonId(4000, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void RequestGotoDungeon(int _bossId)
|
| | | {
|
| | | var config = PersonalBossConfig.Get(_bossId);
|
| | | ClientDungeonStageUtility.GotoNormalClientDungeon(PERSONALBOSS_MAPID, PERSONALBOSS_MAPID, config.lineId);
|
| | | }
|
| | |
|
| | | public void OnMapInitOk()
|
| | | {
|
| | | var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>();
|
| | |
| | | if (stepTimer >= existTime)
|
| | | {
|
| | | step = Step.Exit;
|
| | | model.RequestExitClientDungeon();
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | {
|
| | | if (GUILayout.Button("Exit"))
|
| | | {
|
| | | model.RequestExitClientDungeon();
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | }
|
| | | }
|
| | | #endif
|
| | |
| | | {
|
| | | if (GUILayout.Button("Exit"))
|
| | | {
|
| | | model.RequestExitClientDungeon();
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | }
|
| | | }
|
| | | #endif
|
| | |
| | |
|
| | | public bool IsInDungeon { get; private set; }
|
| | |
|
| | | bool requireExitClientDungeon = false;
|
| | |
|
| | | public int invincibleBuffId { get; private set; }
|
| | |
|
| | | public const int Client_MapID = 2000;
|
| | |
| | | GA_Hero.OnStopBeAttacked -= OnStopBeAttacked;
|
| | |
|
| | | m_AttackHeroPlayers.Clear();
|
| | |
|
| | | if (requireExitClientDungeon)
|
| | | {
|
| | | requireExitClientDungeon = false;
|
| | | ClientDungeonStageUtility.RequestExitClientDungeon();
|
| | | }
|
| | |
|
| | | IsInDungeon = false;
|
| | | if (IsInDemonKingDungeon(mapId))
|
| | |
| | | public void RequestEnterClientDungeon()
|
| | | {
|
| | | var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
|
| | | ClientDungeonStageUtility.RequestStartClientDungeon(config.dungeonId, config.lineId,(dungeonInfo,isOk)=> |
| | | {
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | if (hero != null)
|
| | | {
|
| | | hero.StopAll();
|
| | | }
|
| | | MapTransferUtility.Instance.Clear();
|
| | | ClientDungeonStageUtility.SetClientDungeon(true, Client_MapID);
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = Client_MapID,
|
| | | toLineId = 0,
|
| | | needEmpty = true,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true
|
| | | });
|
| | |
|
| | | PlayerDatas.Instance.baseData.mainServerMapIdRecord = PlayerDatas.Instance.baseData.MapID;
|
| | | PlayerDatas.Instance.baseData.MapID = Client_MapID;
|
| | | var attackMode = new C030A_tagCChangeAttackMode();
|
| | | attackMode.Mode = (byte)E_AttackMode.Contest;
|
| | | GameNetSystem.Instance.PushPackage(attackMode, ServerType.Main);
|
| | | });
|
| | | }
|
| | |
|
| | | public void RequestExitClientDungeon()
|
| | | {
|
| | | requireExitClientDungeon = true;
|
| | |
|
| | | ClientDungeonStageUtility.SetClientDungeon(false, 0);
|
| | | PlayerDatas.Instance.extersion.pkState = 0;
|
| | | ModelCenter.Instance.GetModel<DungeonModel>().ResetBufData();
|
| | |
|
| | | PlayerDatas.Instance.baseData.MapID = PlayerDatas.Instance.baseData.mainServerMapIdRecord;
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = PlayerDatas.Instance.baseData.MapID,
|
| | | toLineId = 0,
|
| | | needEmpty = true,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true,
|
| | | refreshPlayerDatas=true
|
| | | });
|
| | | ClientDungeonStageUtility.GotoNormalClientDungeon(Client_MapID, config.dungeonId, config.lineId);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (PlayerDatas.Instance.baseData.MapID == HazyDemonKingModel.Client_MapID)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<HazyDemonKingModel>().RequestExitClientDungeon();
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | public bool IsInDungeon { get; private set; }
|
| | |
|
| | | bool requireExitClientDungeon = false;
|
| | |
|
| | | public event Action onMapNpcCountRefresh;
|
| | |
|
| | | HazyRegionModel hazyRegionModel { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
|
| | |
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | |
|
| | | m_MapNpcCount.Clear();
|
| | |
|
| | | if (requireExitClientDungeon)
|
| | | {
|
| | | requireExitClientDungeon = false;
|
| | | ClientDungeonStageUtility.RequestExitClientDungeon();
|
| | | }
|
| | |
|
| | | IsInDungeon = false;
|
| | | if (IsInGrassDungeon(mapId))
|
| | |
| | | public void RequestEnterClientDungeon()
|
| | | {
|
| | | var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
|
| | |
|
| | |
|
| | | MapTransferUtility.Instance.Clear();
|
| | | ClientDungeonStageUtility.RequestStartClientDungeon(config.dungeonId, config.lineId,(dungeonInfo,isOk)=> |
| | | {
|
| | | var mapId = GetClientMapId(hazyRegionModel.processingIncidentId);
|
| | |
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | if (hero != null)
|
| | | {
|
| | | hero.StopAll();
|
| | | }
|
| | |
|
| | | ClientDungeonStageUtility.SetClientDungeon(true, (ushort)mapId);
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = mapId,
|
| | | toLineId = 0,
|
| | | needEmpty = true,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true
|
| | | });
|
| | |
|
| | | PlayerDatas.Instance.baseData.mainServerMapIdRecord = PlayerDatas.Instance.baseData.MapID;
|
| | | PlayerDatas.Instance.baseData.MapID = (ushort)mapId;
|
| | | var attackMode = new C030A_tagCChangeAttackMode();
|
| | | attackMode.Mode = (byte)E_AttackMode.Peace;
|
| | | GameNetSystem.Instance.PushPackage(attackMode, ServerType.Main);
|
| | | });
|
| | |
|
| | | }
|
| | |
|
| | | public void RequestExitClientDungeon()
|
| | | {
|
| | | requireExitClientDungeon = true;
|
| | | ClientDungeonStageUtility.SetClientDungeon(false, 0);
|
| | | PlayerDatas.Instance.extersion.pkState = 0;
|
| | | ModelCenter.Instance.GetModel<DungeonModel>().ResetBufData();
|
| | |
|
| | | PlayerDatas.Instance.baseData.MapID = PlayerDatas.Instance.baseData.mainServerMapIdRecord;
|
| | | StageLoad.Instance.PushSceneLoadCommand(new StageLoad.StageLoadCommand()
|
| | | {
|
| | | toMapId = PlayerDatas.Instance.baseData.MapID,
|
| | | toLineId = 0,
|
| | | needEmpty = true,
|
| | | needLoadResource = true,
|
| | | serverType = ServerType.Main,
|
| | | isClientLoadMap = true,
|
| | | refreshPlayerDatas=true
|
| | | });
|
| | | var mapId = GetClientMapId(hazyRegionModel.processingIncidentId);
|
| | | ClientDungeonStageUtility.GotoNormalClientDungeon(mapId, config.dungeonId, config.lineId);
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | break;
|
| | | case HazyRegionIncidentType.Precious:
|
| | | BossShowModel.Instance.reqDungeonLineId = 0;
|
| | | ClientHazyPreciousDungeon.RequestEnter();
|
| | | ClientDungeonStageUtility.GotoNormalClientDungeon(config.dungeonId, config.dungeonId, config.lineId);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (!IsCompleteDialogue)
|
| | | {
|
| | | ClientTreasureDungeon.RequestExit();
|
| | | ClientDungeonStageUtility.ExitNormalClientDungeon();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (model.selectedTreasure == 101)
|
| | | {
|
| | | ClientTreasureDungeon.RequestEnter();
|
| | | ClientDungeonStageUtility.GotoNormalClientDungeon(4000, 0, 0);
|
| | | return;
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.LV >= config.ChallengeLevel)
|