Merge branch 'HazyRegion_1' of http://192.168.0.87:10010/r/snxxz_scripts into HazyRegion_1
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Tuesday, May 21, 2019 |
| | | // [ Date ]: Thursday, May 23, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | |
| | | public readonly int NPCID;
|
| | | public readonly int lineId;
|
| | | public readonly int ChanllengeLv;
|
| | | public readonly int[] MustItemID;
|
| | | public readonly int[] RareItemID;
|
| | | public readonly string PortraitID; |
| | |
| | |
|
| | | int.TryParse(tables[1],out lineId);
|
| | |
|
| | | int.TryParse(tables[2],out ChanllengeLv); |
| | |
|
| | | string[] MustItemIDStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] MustItemIDStringArray = tables[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | MustItemID = new int[MustItemIDStringArray.Length]; |
| | | for (int i=0;i<MustItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(MustItemIDStringArray[i],out MustItemID[i]); |
| | | }
|
| | |
|
| | | string[] RareItemIDStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] RareItemIDStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RareItemID = new int[RareItemIDStringArray.Length]; |
| | | for (int i=0;i<RareItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | }
|
| | |
|
| | | PortraitID = tables[5]; |
| | | PortraitID = tables[4]; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f73cc9f99bc29204fb20c8eecff4b111 |
| | | timeCreated: 1558426179 |
| | | timeCreated: 1558594484 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "NPCID", _g_get_NPCID); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "ChanllengeLv", _g_get_ChanllengeLv); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "MustItemID", _g_get_MustItemID); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "RareItemID", _g_get_RareItemID); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "PortraitID", _g_get_PortraitID); |
| | |
| | | |
| | | PersonalBossConfig gen_to_be_invoked = (PersonalBossConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.NPCID); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_ChanllengeLv(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | PersonalBossConfig gen_to_be_invoked = (PersonalBossConfig)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ChanllengeLv); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | |
| | | {
|
| | | var config = bossConfigs[i];
|
| | | var bossData = personalBosses[config.NPCID] = new PersonalBossData(config.NPCID);
|
| | | bossData.challengableLevel = config.ChanllengeLv;
|
| | | var dungeonId = dungeonModel.GetDungeonId(PERSONALBOSS_MAPID, config.lineId);
|
| | | var dungeonConfig = DungeonConfig.Get(dungeonId);
|
| | | if (dungeonConfig != null)
|
| | | {
|
| | | bossData.challengableLevel = dungeonConfig.LVLimitMin;
|
| | | }
|
| | | }
|
| | |
|
| | | sortedBossIds.AddRange(personalBosses.Keys);
|
| | |
| | | return PersonalBossData.ChallengableLevelCompare(data1, data2);
|
| | | });
|
| | |
|
| | | var dungeonId = dungeonModel.GetDungeonId(PERSONALBOSS_MAPID, 0);
|
| | | var dungeonConfig = DungeonConfig.Get(dungeonId);
|
| | | dungeonTicket = dungeonConfig == null ? 0 : dungeonConfig.TicketID;
|
| | |
|
| | | {
|
| | | var dungeonId = dungeonModel.GetDungeonId(PERSONALBOSS_MAPID, 0);
|
| | | var dungeonConfig = DungeonConfig.Get(dungeonId);
|
| | | dungeonTicket = dungeonConfig == null ? 0 : dungeonConfig.TicketID;
|
| | | }
|
| | | }
|
| | |
|
| | | public void RequestGotoDungeon(int _bossId)
|
| | |
| | | break;
|
| | | case 3:
|
| | | var config = PersonalBossConfig.Get(model.selectedBoss);
|
| | | SysNotifyMgr.Instance.ShowTip("PersonalBoss_LevelLimit", config.ChanllengeLv);
|
| | | var dungeonId = dungeonModel.GetDungeonId(PersonalBossModel.PERSONALBOSS_MAPID, config.lineId);
|
| | | var dungeonConfig = DungeonConfig.Get(dungeonId);
|
| | | SysNotifyMgr.Instance.ShowTip("PersonalBoss_LevelLimit", dungeonConfig.LVLimitMin);
|
| | | break;
|
| | | case 4:
|
| | | SysNotifyMgr.Instance.ShowTip("DungeonNoGO");
|
| | |
| | |
|
| | | private void OnDungeonResultEvent()
|
| | | {
|
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 5 * 1000);
|
| | | dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 10 * 1000);
|
| | |
|
| | | hasCompleted = true;
|
| | | ClientDungeonStageUtility.ClearClientDataMapSymbol();
|