少年修仙传客户端代码仓库
hch
2019-10-16 f3fb1aa143be2b56ff3ed5c8bc6bc1bf7c1c5e0c
0312 BOSS首杀
6个文件已修改
13个文件已添加
913 ■■■■■ 已修改文件
Core/GameEngine/DataToCtl/PackageRegedit.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/BOSSFirstKillConfig.cs 212 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/BOSSFirstKillConfig.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToGameServer/CA9_Function/CA901_tagCGGetBossFirstKillAward.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAB_Activity/DTCAB01_tagMCBossFirstKillStateInfo.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HAB_Activity/DTCAB01_tagMCBossFirstKillStateInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HAB_Activity/HAB01_tagMCBossFirstKillStateInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/BossFirstBloodCell.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/BossFirstBloodCell.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/BossFirstBloodItemInfo.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/BossFirstBloodItemInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/BossFirstBloodModel.cs 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/BossFirstBloodModel.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/BossFirstBloodWin.cs 309 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/BossFirstBloodWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/OpenServerActivityRankWin.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Vip/DayPackageModel.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/ModelCenter.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/ConfigInitiator.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -481,6 +481,8 @@
        Register(typeof(HA502_tagMCFamilyActivityExchangeResult), typeof(DTCA502_tagMCFamilyActivityExchangeResult));//装备换活跃度
        Register(typeof(HAA24_tagMCDayFreeGoldGiftState), typeof(DTCAA24_tagMCDayFreeGoldGiftState));
        Register(typeof(HAB01_tagMCBossFirstKillStateInfo), typeof(DTCAB01_tagMCBossFirstKillStateInfo));
    }
    private static void Register(Type _pack, Type _business)
Core/GameEngine/Model/Config/BOSSFirstKillConfig.cs
New file
@@ -0,0 +1,212 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           Wednesday, October 16, 2019
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
[XLua.LuaCallCSharp]
public partial class BOSSFirstKillConfig
{
    public readonly int NPCID;
    public readonly string ServerFirstKillPlayerAward;
    public readonly int PerPlayerMoneyAward;
    public readonly string PersonFirstKillAward;
    public readonly int Sort;
    public BOSSFirstKillConfig()
    {
    }
    public BOSSFirstKillConfig(string input)
    {
        try
        {
            var tables = input.Split('\t');
            int.TryParse(tables[0],out NPCID);
            ServerFirstKillPlayerAward = tables[1];
            int.TryParse(tables[2],out PerPlayerMoneyAward);
            PersonFirstKillAward = tables[3];
            int.TryParse(tables[4],out Sort);
        }
        catch (Exception ex)
        {
            DebugEx.Log(ex);
        }
    }
    static Dictionary<string, BOSSFirstKillConfig> configs = new Dictionary<string, BOSSFirstKillConfig>();
    public static BOSSFirstKillConfig Get(string id)
    {
        if (!inited)
        {
            Debug.Log("BOSSFirstKillConfig 还未完成初始化。");
            return null;
        }
        if (configs.ContainsKey(id))
        {
            return configs[id];
        }
        BOSSFirstKillConfig config = null;
        if (rawDatas.ContainsKey(id))
        {
            config = configs[id] = new BOSSFirstKillConfig(rawDatas[id]);
            rawDatas.Remove(id);
        }
        return config;
    }
    public static BOSSFirstKillConfig Get(int id)
    {
        return Get(id.ToString());
    }
    public static List<string> GetKeys()
    {
        var keys = new List<string>();
        keys.AddRange(configs.Keys);
        keys.AddRange(rawDatas.Keys);
        return keys;
    }
    public static List<BOSSFirstKillConfig> GetValues()
    {
        var values = new List<BOSSFirstKillConfig>();
        values.AddRange(configs.Values);
        var keys = new List<string>(rawDatas.Keys);
        foreach (var key in keys)
        {
            values.Add(Get(key));
        }
        return values;
    }
    public static bool Has(string id)
    {
        return configs.ContainsKey(id) || rawDatas.ContainsKey(id);
    }
    public static bool Has(int id)
    {
        return Has(id.ToString());
    }
    public static bool inited { get; private set; }
    protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>();
    public static void Init(bool sync=false)
    {
        inited = false;
        var path = string.Empty;
        if (AssetSource.refdataFromEditor)
        {
            path = ResourcesPath.CONFIG_FODLER +"/BOSSFirstKill.txt";
        }
        else
        {
            path = AssetVersionUtility.GetAssetFilePath("config/BOSSFirstKill.txt");
        }
        configs.Clear();
        var tempConfig = new BOSSFirstKillConfig();
        var preParse = tempConfig is IConfigPostProcess;
        if (sync)
        {
            var lines = File.ReadAllLines(path);
            if (!preParse)
            {
                rawDatas = new Dictionary<string, string>(lines.Length - 3);
            }
            for (int i = 3; i < lines.Length; i++)
            {
                try
                {
                    var line = lines[i];
                    var index = line.IndexOf("\t");
                    if (index == -1)
                    {
                        continue;
                    }
                    var id = line.Substring(0, index);
                    if (preParse)
                    {
                        var config = new BOSSFirstKillConfig(line);
                        configs[id] = config;
                        (config as IConfigPostProcess).OnConfigParseCompleted();
                    }
                    else
                    {
                        rawDatas[id] = line;
                    }
                }
                catch (System.Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            inited = true;
        }
        else
        {
            ThreadPool.QueueUserWorkItem((object _object) =>
            {
                var lines = File.ReadAllLines(path);
                if (!preParse)
                {
                    rawDatas = new Dictionary<string, string>(lines.Length - 3);
                }
                for (int i = 3; i < lines.Length; i++)
                {
                    try
                    {
                       var line = lines[i];
                        var index = line.IndexOf("\t");
                        if (index == -1)
                        {
                            continue;
                        }
                        var id = line.Substring(0, index);
                        if (preParse)
                        {
                            var config = new BOSSFirstKillConfig(line);
                            configs[id] = config;
                            (config as IConfigPostProcess).OnConfigParseCompleted();
                        }
                        else
                        {
                            rawDatas[id] = line;
                        }
                    }
                    catch (System.Exception ex)
                    {
                        Debug.LogError(ex);
                    }
                }
                inited = true;
            });
        }
    }
}
Core/GameEngine/Model/Config/BOSSFirstKillConfig.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 5ca772d5c4e9a55429c17ebcaccfe4a3
timeCreated: 1571198699
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ClientPack/ClientToGameServer/CA9_Function/CA901_tagCGGetBossFirstKillAward.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c655e19a477d35042a649499baca7649
timeCreated: 1571173614
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/HAB_Activity/DTCAB01_tagMCBossFirstKillStateInfo.cs
@@ -1,11 +1,15 @@
using UnityEngine;
using System.Collections;
using Snxxz.UI;
// AB 01 Boss首杀玩家奖励信息 #tagMCBossFirstKillStateInfo
public class DTCAB01_tagMCBossFirstKillStateInfo : DtcBasic {
    BossFirstBloodModel model { get { return ModelCenter.Instance.GetModel<BossFirstBloodModel>(); } }
    public override void Done(GameNetPackBasic vNetPack) {
        base.Done(vNetPack);
        HAB01_tagMCBossFirstKillStateInfo vNetData = vNetPack as HAB01_tagMCBossFirstKillStateInfo;
        HAB01_tagMCBossFirstKillStateInfo vNetData = vNetPack as HAB01_tagMCBossFirstKillStateInfo;         model.BossFirstKillStateInfo(vNetData);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HAB_Activity/DTCAB01_tagMCBossFirstKillStateInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 06605f7cdac6d5d4c9fbeebbddc55643
timeCreated: 1571173613
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ServerPack/HAB_Activity/HAB01_tagMCBossFirstKillStateInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 560fee9fcb7d5f640ab899e9d565de5a
timeCreated: 1571173614
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/BossFirstBloodCell.cs
New file
@@ -0,0 +1,39 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class BossFirstBloodCell : CellView
    {
        [SerializeField] Image m_Select;
        [SerializeField] Image m_NPCIcon;
        [SerializeField] Button m_FuncBtn;
        public Button funcBtn
        {
            get
            {
                return m_FuncBtn;
            }
        }
        public void Display(int index)
        {
        }
        public void ShowIcon(int _npcId, bool isSelect)
        {
            m_Select.SetActive(isSelect);
            m_NPCIcon.SetActive(true);
            var npcConfig = NPCConfig.Get(_npcId);
            m_NPCIcon.SetSprite(npcConfig.HeadPortrait);
        }
    }
}
System/OpenServerActivity/BossFirstBloodCell.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 8bbc9f5e82bef84429cb0e84e3fe3f09
timeCreated: 1571153190
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/BossFirstBloodItemInfo.cs
New file
@@ -0,0 +1,30 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Monday, July 23, 2018
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class BossFirstBloodItemInfo : MonoBehaviour
    {
        [SerializeField] RectTransform m_AlreadyGet;
        [SerializeField] ItemCell m_Itemcell;
        public RectTransform AlreadyGetImage
        {
            get { return m_AlreadyGet; }
        }
        public ItemCell Item_Cell
        {
            get { return m_Itemcell; }
            set { m_Itemcell = value; }
        }
    }
}
System/OpenServerActivity/BossFirstBloodItemInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e1dbecb5544a32d408e1e900f6617f37
timeCreated: 1571188092
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/BossFirstBloodModel.cs
New file
@@ -0,0 +1,156 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    [XLua.LuaCallCSharp]
    public class BossFirstBloodModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk, IOpenServerActivity
    {
        ImpactRankModel impactRankModel
        {
            get
            {
                return ModelCenter.Instance.GetModel<ImpactRankModel>();
            }
        }
        public int selectIndex = 0;
        public int selectNPCID = 0;
        public struct FirstKillTimeInfo
        {
            public string name;
            public string time;
        }
        Dictionary<int, int> FirstKillStateInfo = new Dictionary<int, int>(); // 击杀奖励状态
        public Dictionary<int, FirstKillTimeInfo> firstKillTimeInfo = new Dictionary<int, FirstKillTimeInfo>(); // 首杀名和时间
        public List<string> npcIDConfig;
        public bool IsOpen
        {
            get
            {
                return impactRankModel.IsOpen;
            }
        }
        public bool priorityOpen
        {
            get
            {
                //var state = impactRankRedpoint.state;
                //return state == RedPointState.Simple || state == RedPointState.GetReward;
                return false;
            }
        }
        public bool IsAdvance
        {
            get
            {
                return false;
            }
        }
        public event Action<int> onStateUpdate;
        public override void Init()
        {
            OpenServerActivityCenter.Instance.Register(100, this);
            InitNpcInfo();
            DTCA003_tagUniversalGameRecInfo.onGetUniversalGameInfo += OnGetUniversalGameInfo;
        }
        private void SendGameRec()
        {
            var pak = new CA001_tagViewUniversalGameRec();
            pak.ViewType = 31;
            GameNetSystem.Instance.SendInfo(pak);
        }
        public event Action<int> OnFirstKillInfo;
        private void OnGetUniversalGameInfo(HA003_tagUniversalGameRecInfo package)
        {
            if (package.Type == 31)
            {
                for (int i = 0; i < package.Count; i++)
                {
                    int npcID = (int)package.UniversalGameRec[i].Value1;
                    firstKillTimeInfo[(int)package.UniversalGameRec[i].Value1] = new FirstKillTimeInfo()
                    {
                        name = package.UniversalGameRec[i].StrValue3,
                        time = package.UniversalGameRec[i].StrValue2,
                    };
                    if (!WindowCenter.Instance.IsOpen<BossFirstBloodWin>() && OnFirstKillInfo != null)
                        OnFirstKillInfo(npcID);
                }
            }
        }
        public void OnBeforePlayerDataInitialize()
        {
            FirstKillStateInfo.Clear();
            firstKillTimeInfo.Clear();
        }
        public void OnPlayerLoginOk()
        {
            SendGameRec();
        }
        public void InitNpcInfo()
        {
            npcIDConfig = BOSSFirstKillConfig.GetKeys();
            npcIDConfig.Sort((string x, string y) =>
            {
                var infoX = BOSSFirstKillConfig.Get(x);
                var infoY = BOSSFirstKillConfig.Get(y);
                return infoX.Sort.CompareTo(infoY.Sort);
            });
        }
        public override void UnInit()
        {
        }
        public event Action<int> UpdatePersonnalKillEvent;
        public void BossFirstKillStateInfo(HAB01_tagMCBossFirstKillStateInfo package)
        {
            for (int i=0; i < package.BossCount; i++)
            {
                FirstKillStateInfo[(int)package.FirstKillStateList[i].NPCID] = (int)package.FirstKillStateList[i].FKState;
                if (UpdatePersonnalKillEvent != null)
                    UpdatePersonnalKillEvent((int)package.FirstKillStateList[i].NPCID);
            }
        }
        public int GetPersonalKillAwardState(int npcID)
        {
            //0 未击杀 1 可领取 2 已领取
            if (FirstKillStateInfo.ContainsKey(npcID))
            {
                int state = FirstKillStateInfo[npcID];
                if (state % 10 == 0)
                    return 0;
                if (state % 10 > 0 && state/100 == 0)
                    return 1;
                if (state % 10 > 0 && state / 100 == 1)
                    return 2;
            }
            return 0;
        }
        public bool IsAlreadyFirstKill(int npcID)
        {
            if (firstKillTimeInfo.ContainsKey(npcID))
                return true;
            return false;
        }
    }
}
System/OpenServerActivity/BossFirstBloodModel.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: d2c7a8e1ad666b94d925259e5ab528a0
timeCreated: 1571131037
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/BossFirstBloodWin.cs
New file
@@ -0,0 +1,309 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using LitJson;
namespace Snxxz.UI
{
    //开服活动BOSS首杀
    public class BossFirstBloodWin : Window
    {
        [SerializeField] Button m_Goto;
        [SerializeField] Button m_GetAward;
        [SerializeField] ScrollerController m_BossCtrl;
        [SerializeField] RawImage m_MonsterPortrait;
        [SerializeField] Transform m_HorizontaFirstBlood;
        [SerializeField] Transform m_HorizontaKill;
        [SerializeField] Text m_NPCNameLV;
        [SerializeField] Text m_PlayerName;
        [SerializeField] Text m_KillTime;
        BossFirstBloodModel model
        {
            get
            {
                return ModelCenter.Instance.GetModel<BossFirstBloodModel>();
            }
        }
        FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        protected override void AddListeners()
        {
        }
        private void OnRefreshCell(ScrollerDataType type, CellView cell)
        {
            if (type == ScrollerDataType.Header)
                RefreshNPCCell(cell as BossFirstBloodCell);
        }
        private void RefreshNPCCell(BossFirstBloodCell _cell)
        {
            int npcID = _cell.info.Value.infoInt1;
            _cell.ShowIcon(npcID, _cell.index == model.selectIndex);
            _cell.funcBtn.onClick.RemoveAllListeners();
            _cell.funcBtn.onClick.AddListener(() =>
            {
                OnBossIconClick(npcID, _cell.index);
            });
        }
        private void GotoKillBoss(int npcID)
        {
            var error = 0;
            if (TestGotoKillBoss(npcID, out error))
            {
                WindowJumpMgr.Instance.ClearJumpData();
                WindowCenter.Instance.Close<OpenServerActivityRankWin>();
                MapTransferUtility.Instance.MoveToNPC(npcID);
            }
            else
            {
                ProcessGotoKillBossError(npcID, error);
            }
        }
        private void ProcessGotoKillBossError(int npcID, int _error)
        {
            switch (_error)
            {
                case 1:
                    var dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
                    var config = DungeonOpenTimeConfig.Get(dataMapId);
                    var tip = Language.Get(config.ExitDescription);
                    ConfirmCancel.ShowPopConfirm(
                        Language.Get("Mail101"),
                        tip,
                        (bool _ok) =>
                        {
                            if (_ok)
                            {
                                WindowCenter.Instance.Close<FindPreciousFrameWin>();
                                MapTransferUtility.Instance.MoveToNPC(npcID);
                            }
                        }
                        );
                    break;
                case 2:
                    SysNotifyMgr.Instance.ShowTip("InDungeon_CantGo");
                    break;
                case 3:
                    SysNotifyMgr.Instance.ShowTip("CrossMap10");
                    break;
                case 4:
                    SysNotifyMgr.Instance.ShowTip("BossRealmHint2", NPCConfig.Get(npcID).Realm);
                    break;
            }
        }
        private bool TestGotoKillBoss(int npcID, out int _error)
        {
            if (!findPreciousModel.IsBossUnlock(npcID))
            {
                _error = 4;
                return false;
            }
            var mapId = PlayerDatas.Instance.baseData.MapID;
            var dataMapId = MapUtility.GetDataMapId(mapId);
            if (dataMapId == ElderGodAreaModel.ELDERGODAREA_MAPID)
            {
                _error = 1;
                return false;
            }
            var mapConfig = MapConfig.Get(mapId);
            if (mapConfig.MapFBType != (int)MapType.OpenCountry)
            {
                _error = 2;
                return false;
            }
            if (CrossServerUtility.IsCrossServer() || ClientCrossServerOneVsOne.isClientCrossServerOneVsOne)
            {
                _error = 3;
                return false;
            }
            _error = 0;
            return true;
        }
        private void SendGetAward(int npcID, int awardType)
        {
            var pak = new CA901_tagCGGetBossFirstKillAward();
            pak.NPCID = (uint)npcID;
            pak.AwardType = (byte)awardType;
            GameNetSystem.Instance.SendInfo(pak);
        }
        private void OnBossIconClick(int npcID, int index)
        {
            var npcConfig = NPCConfig.Get(npcID);
            UI3DModelExhibition.Instance.ShowNPC(npcID, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, m_MonsterPortrait);
            model.selectIndex = index;
            model.selectNPCID = npcID;
            m_BossCtrl.m_Scorller.RefreshActiveCellViews();
            m_NPCNameLV.text = npcConfig.charName + " LV." + npcConfig.NPCLV;
            ShowKillInfo(npcID);
        }
        public void ShowKillInfo(int npcID)
        {
            if (model.selectNPCID != npcID)
                return;
            var fkInfo = BOSSFirstKillConfig.Get(npcID);
            bool isAlreadyFirstKill = model.IsAlreadyFirstKill(npcID);
            int killStateSelf = model.GetPersonalKillAwardState(npcID);
            m_Goto.RemoveAllListeners();
            m_GetAward.RemoveAllListeners();
            if (killStateSelf == 1)
            {
                m_GetAward.gameObject.SetActive(true);
                m_Goto.gameObject.SetActive(false);
                m_GetAward.AddListener(() =>
                {
                    SendGetAward(npcID, 1);
                });
            }
            else
            {
                m_GetAward.gameObject.SetActive(false);
                m_Goto.gameObject.SetActive(true);
                m_Goto.AddListener(() =>
                {
                    GotoKillBoss(npcID);
                });
            }
            if (isAlreadyFirstKill)
            {
                m_PlayerName.text = "首杀玩家:" + model.firstKillTimeInfo[npcID].name;
                m_KillTime.text = "首杀时间:" + model.firstKillTimeInfo[npcID].time;
            }
            else
            {
                m_PlayerName.text = "暂无玩家首杀";
                m_KillTime.text = string.Empty;
            }
            //首杀奖励
            for (int i = 0; i < m_HorizontaFirstBlood.childCount; i++)
            {
                m_HorizontaFirstBlood.GetChild(i).gameObject.SetActive(false);
            }
            var fkitemsArray = JsonMapper.ToObject<int[][]>(fkInfo.ServerFirstKillPlayerAward);
            for (int type = 0; type < fkitemsArray.Length; type++)
            {
                if (type < m_HorizontaFirstBlood.childCount)
                {
                    int itemId = fkitemsArray[type][0];
                    var Item_Info = m_HorizontaFirstBlood.GetChild(type);
                    Item_Info.gameObject.SetActive(true);
                    BossFirstBloodItemInfo firstBItemInfo = Item_Info.GetComponent<BossFirstBloodItemInfo>();
                    firstBItemInfo.AlreadyGetImage.SetActive(isAlreadyFirstKill);
                    var ItemCell = firstBItemInfo.Item_Cell;
                    var Item = ItemConfig.Get(itemId);
                    ItemCellModel cellModel = new ItemCellModel(itemId, true, (ulong)fkitemsArray[type][1]);
                    ItemCell.Init(cellModel);
                    ItemCell.button.RemoveAllListeners();
                    ItemCell.button.AddListener(() =>
                    {
                        ItemTipUtility.Show(itemId);
                    });
                }
            }
            //击杀奖励
            for (int i = 0; i < m_HorizontaKill.childCount; i++)
            {
                m_HorizontaKill.GetChild(i).gameObject.SetActive(false);
            }
            var itemsArray = JsonMapper.ToObject<int[][]>(fkInfo.PersonFirstKillAward);
            for (int type = 0; type < itemsArray.Length; type++)
            {
                if (type < m_HorizontaKill.childCount)
                {
                    int itemId = itemsArray[type][0];
                    var Item_Info = m_HorizontaKill.GetChild(type);
                    Item_Info.gameObject.SetActive(true);
                    BossFirstBloodItemInfo itemInfo = Item_Info.GetComponent<BossFirstBloodItemInfo>();
                    itemInfo.AlreadyGetImage.SetActive(killStateSelf == 2);
                    var ItemCell = itemInfo.Item_Cell;
                    var Item = ItemConfig.Get(itemId);
                    ItemCellModel cellModel = new ItemCellModel(itemId, true, (ulong)itemsArray[type][1]);
                    ItemCell.Init(cellModel);
                    ItemCell.button.RemoveAllListeners();
                    ItemCell.button.AddListener(() =>
                    {
                        ItemTipUtility.Show(itemId);
                    });
                }
            }
        }
        protected override void BindController()
        {
        }
        protected override void OnAfterClose()
        {
        }
        protected override void OnAfterOpen()
        {
            JumpNpcByIndex(0);
        }
        protected override void OnPreClose()
        {
            m_BossCtrl.OnRefreshCell -= OnRefreshCell;
            model.UpdatePersonnalKillEvent -= ShowKillInfo;
        }
        protected override void OnPreOpen()
        {
            m_BossCtrl.OnRefreshCell += OnRefreshCell;
            model.UpdatePersonnalKillEvent += ShowKillInfo;
            CreateNPCScroll();
        }
        private void CreateNPCScroll()
        {
            int i = 0;
            m_BossCtrl.Refresh();
            foreach (string npcID in model.npcIDConfig)
            {
                CellInfo info = new CellInfo();
                info.infoInt1 = int.Parse(npcID);
                m_BossCtrl.AddCell(ScrollerDataType.Header, i, info);
                i++;
            }
            m_BossCtrl.Restart();
            m_BossCtrl.m_Scorller.RefreshActiveCellViews();
        }
        public void JumpNpcByIndex(int index)
        {
            m_BossCtrl.JumpIndex(index);
            CellView cell = m_BossCtrl.GetActiveCellView(index);
            int npcID = cell.info.Value.infoInt1;
            OnBossIconClick(npcID, index);
        }
    }
}
System/OpenServerActivity/BossFirstBloodWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 9d4a5b1d950033e4db894f82da239494
timeCreated: 1571125936
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/OpenServerActivity/OpenServerActivityRankWin.cs
@@ -26,6 +26,7 @@
        protected override void BindController()
        {
            m_OpenServerActivities.Add(100);
            m_OpenServerActivities.Add(0);
        }
@@ -65,8 +66,10 @@
                functionOrder = GetDefaultSelect();
                UpdateFunctionBtns();
            }
            WindowCenter.Instance.Open("ImpactRankWin", true);
            if (functionOrder != 0)
                WindowCenter.Instance.Open<BossFirstBloodWin>();
            else
                WindowCenter.Instance.Open<ImpactRankWin>();
            var index = alreadyOpenActivitys.IndexOf(functionOrder);
@@ -83,7 +86,7 @@
            TimeUtility.OnServerOpenDayRefresh -= OnStepServerDayEvent;
            OpenServerActivityCenter.Instance.openServerActivityStateChange -= OpenServerActivityStateChange;
            impactRankModel.gotoImpactRankType = 0;
            WindowCenter.Instance.Close("ImpactRankWin");
            CloseOtherWin();
        }
        protected override void OnAfterClose()
@@ -190,14 +193,58 @@
            _cell.redpoint.redpointId = MainRedDot.REDPOINT_OPENRANK * 100 + activityType;
            _cell.SetSelect(_cell.activityType == functionOrder);
            if (_cell.activityType == 0)
            _cell.icon.SetSprite("OpenServerActivty_QMCB");
            else
                _cell.icon.SetSprite("OpenServerActivty_BOSSFK");
            _cell.downArrow.gameObject.SetActive(false);
            _cell.upArrow.gameObject.SetActive(false);
            _cell.funcBtn.onClick.RemoveAllListeners();
            _cell.funcBtn.onClick.AddListener(() =>
            {
                OnActivityClick(_cell.activityType);
            });
            
        }
        private void CloseOtherWin()
        {
            var children = WindowConfig.GetChildWindows("OpenServerActivityRankWin");
            foreach (var window in children)
            {
                WindowCenter.Instance.Close(window);
            }
        }
        private void OnActivityClick(int _order)
        {
            if (functionOrder != _order)
            {
                functionOrder = _order;
                OnOpenActivity(functionOrder);
            }
            UpdateFunctionBtns();
        }
        private void OnOpenActivity(int _order)
        {
            CloseOtherWin();
            var functionInfos = WindowConfig.GetWindowFunctionInfos("OpenServerActivityRankWin");
            var index = functionInfos.FindIndex((x) =>
            {
                return x.order == _order;
            });
            if (index != -1)
            {
                WindowCenter.Instance.Open(functionInfos[index].window, true);
            }
        }
        private void OnStepServerDayEvent()
@@ -258,6 +305,7 @@
                        break;
                    
                    default:
                        m_ActivityCtrl.AddCell(ScrollerDataType.Header, activityId);
                        break;
                }
            }
@@ -268,6 +316,8 @@
        private void OnActivityType(int _index)
        {
            if (!WindowCenter.Instance.IsOpen<ImpactRankWin>())
                OnActivityClick(0);
            var _order = _index / 100;
            var _type = _index % 100;
            if (impactRankModel.IsLock(_type))
System/Vip/DayPackageModel.cs
@@ -152,6 +152,8 @@
        m_RechargeDict[0].getCount = package.DayFreeGoldGiftState;
        
        if (onStateUpdate != null) onStateUpdate(selectIndex);
        IsShowTip();
    }
    public void OpenFreePlat(string Title, float RMBNum, string OrderInfo)
System/WindowBase/ModelCenter.cs
@@ -81,6 +81,7 @@
                RegisterModel<GMCmdModel>();
            }
            RegisterModel<BossFirstBloodModel>();
            RegisterModel<UnionTaskModel>();
            RegisterModel<FriendsModel>();
            RegisterModel<RoleParticularModel>();
@@ -236,6 +237,7 @@
            RegisterModel<NewDropItemModel>();
            RegisterModel<ExchangeActiveTokenModel>();
            RegisterModel<AddUpRechargeModel>();
            RegisterModel<BossFirstBloodModel>();
            inited = true;
        }
Utility/ConfigInitiator.cs
@@ -300,6 +300,7 @@
        normalTasks.Add(new ConfigInitTask("ReikiRootEffectConfig", () => { ReikiRootEffectConfig.Init(); }, () => { return ReikiRootEffectConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("ItemExchangeConfig", () => { ItemExchangeConfig.Init(); }, () => { return ItemExchangeConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("AddUpRechargeConfig", () => { AddUpRechargeConfig.Init(); }, () => { return AddUpRechargeConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("BOSSFirstKillConfig", () => { BOSSFirstKillConfig.Init(); }, () => { return BOSSFirstKillConfig.inited; }));
    }
    static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>();