少年修仙传客户端代码仓库
client_linchunjie
2018-08-28 95024f422d4bd8e9954a4ea7b17833ab4f337003
2960 抢Boss活动
3个文件已修改
118 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/BossInfoConfig.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/BossInfoConfig.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyGrabBossWin.cs 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/BossInfoConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Saturday, January 06, 2018
//    [  Date ]:           Tuesday, August 28, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -11,8 +11,9 @@
    
    public partial class BossInfoConfig : ConfigBase {
        public int NPCID { get ; private set ; }
        public int MapID { get ; private set ; }
        public int NPCID { get ; private set ; }
        public int MapID { get ; private set ; }
        public int LineID { get ; private set ; }
        public int StoneNPCID { get ; private set ; }
        public override string getKey()
@@ -23,11 +24,13 @@
        public override void Parse() {
            try
            {
                NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
                MapID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
                StoneNPCID=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
                NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
                MapID=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
                LineID=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
                StoneNPCID=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/BossInfoConfig.cs.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: fd079b12ba8134442adceeacd5b31101
timeCreated: 1515224036
licenseType: Free
timeCreated: 1535438861
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
System/FairyAu/FairyGrabBossWin.cs
@@ -6,6 +6,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using TableConfig;
using UnityEngine;
using UnityEngine.UI;
@@ -21,6 +22,8 @@
        [SerializeField] Text m_SurplusTime;
        FairyGrabBossModel model { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
        #region Built-in
        protected override void BindController()
        {
@@ -135,6 +138,98 @@
        private void Goto()
        {
            var error = 0;
            if (TestEnterDungeon(out error))
            {
                WindowJumpMgr.Instance.ClearJumpData();
                WindowCenter.Instance.Close<LootPreciousFrameWin>();
                MapTransferUtility.Instance.MoveToNPC(model.selectBoss);
            }
            else
            {
                switch (error)
                {
                    case 4:
                        var dataMapId = dungeonModel.GetDungeonDataIdByMapId(PlayerDatas.Instance.baseData.MapID);
                        var config = Config.Instance.Get<DungeonOpenTimeConfig>(dataMapId);
                        var tip = string.Empty;
                        if (dataMapId == BossHomeModel.BOSSHOME_MAPID)
                        {
                            var vipLevel = PlayerDatas.Instance.baseData.VIPLv;
                            var vipNeed = bossHomeModel.GetFloorVipRequirement(PlayerDatas.Instance.baseData.dungeonLineId + 1);
                            if (vipLevel < vipNeed)
                            {
                                var moneyNeed = bossHomeModel.GetVipLackCost(PlayerDatas.Instance.baseData.dungeonLineId + 1);
                                var dungeonId = dungeonModel.DungeonMap(BossHomeModel.BOSSHOME_MAPID, PlayerDatas.Instance.baseData.dungeonLineId);
                                var dungeonConfig = Config.Instance.Get<DungeonConfig>(dungeonId);
                                tip = Language.Get("QuitRemindBossHome", dungeonConfig.FBName, vipNeed, moneyNeed);
                            }
                            else
                            {
                                tip = Language.Get(config.ExitDescription);
                            }
                        }
                        else
                        {
                            tip = Language.Get(config.ExitDescription);
                        }
                        ConfirmCancel.ShowPopConfirm(
                            Language.Get("Mail101"),
                            tip,
                            (bool _ok) =>
                            {
                                if (_ok)
                                {
                                    WindowCenter.Instance.Close<FindPreciousFrameWin>();
                                    MapTransferUtility.Instance.MoveToNPC(model.selectBoss);
                                }
                            }
                            );
                        break;
                    case 5:
                        SysNotifyMgr.Instance.ShowTip("InDungeon_CantGo");
                        break;
                }
            }
        }
        private bool TestEnterDungeon(out int _error)
        {
            if (!PlayerDatas.Instance.fairyData.HasFairy)
            {
                _error = 1;
                return false;
            }
            if (!FuncOpen.Instance.IsFuncOpen(139))
            {
                _error = 2;
                return false;
            }
            if (!model.IsOpen)
            {
                _error = 3;
                return false;
            }
            var mapId = PlayerDatas.Instance.baseData.MapID;
            var dataMapId = dungeonModel.GetDungeonDataIdByMapId(mapId);
            if (dataMapId == BossHomeModel.BOSSHOME_MAPID || dataMapId == ElderGodAreaModel.ELDERGODAREA_MAPID)
            {
                _error = 4;
                return false;
            }
            var mapConfig = Config.Instance.Get<MapConfig>(mapId);
            if (mapConfig.MapFBType != (int)MapType.OpenCountry)
            {
                _error = 5;
                return false;
            }
            _error = 0;
            return true;
        }
        private void KillRecord()