少年修仙传客户端代码仓库
client_Zxw
2018-11-24 0548a2d4e8cb2b39e16a47fc050551ec65a7033a
4714 【1.3】【前端】新的洗练副本-冰晶矿脉(新),原冰晶矿脉副本删除
2个文件已修改
58 ■■■■■ 已修改文件
System/Dungeon/IceCrystalVeinModel.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/IceCrystalVeinWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/IceCrystalVeinModel.cs
@@ -26,6 +26,7 @@
{
    public Dictionary<int, IceLodeStarAwardClass> DicIceLodeStarAward = new Dictionary<int, IceLodeStarAwardClass>();
    public List<int> LineList = new List<int>();//玩法列表
    private List<IceLodeStarAwardClass> IceLodeStarAwardList = new List<IceLodeStarAwardClass>();
    public Dictionary<int, string> IconKeyDic = new Dictionary<int, string>();
    public int AwardRecord = 0;//领奖记录
    public int HasSweep = 0;//是否已扫荡
@@ -37,6 +38,8 @@
    DungeonModel m_Model;
    DungeonModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DungeonModel>()); } }
    public const int ICECRYSTALVEIN_MAPID = 31140;
    public const int ICECRYSTALVEIN_REDPOINT = 78102;
    public Redpoint Redpoint = new Redpoint(78001, ICECRYSTALVEIN_REDPOINT);
    public override void Init()
    {
        var IceLodeCfg = Config.Instance.Get<FuncConfigConfig>("IceLodeCfg");
@@ -49,15 +52,26 @@
    }
    public void OnBeforePlayerDataInitialize()
    {
        model.dungeonRecordChangeEvent -= dungeonRecordChangeEvent;
    }
    private void dungeonRecordChangeEvent(int fbId)
    {
        if (fbId == ICECRYSTALVEIN_MAPID)
        {
            IsShowRedPoint();
        }
    }
    public override void UnInit()
    {
    }
    public void OnPlayerLoginOk()
    {
        model.dungeonRecordChangeEvent += dungeonRecordChangeEvent;
        AddIceLodeStarAwardList();
        IsShowRedPoint();
    }
    private void Assignment()
@@ -107,6 +121,8 @@
        AwardRecord = (int)info.AwardRecord;
        HasSweep = (int)info.HasSweep;
        DayLv = (int)info.DayLV;
        AddIceLodeStarAwardList();
        IsShowRedPoint();
        if (UpdateIceLodeInf != null)
        {
            UpdateIceLodeInf();
@@ -163,6 +179,42 @@
        }
        return true;
    }
    private void AddIceLodeStarAwardList()
    {
        IceLodeStarAwardList.Clear();
        foreach (var key in DicIceLodeStarAward.Keys)
        {
            var Dic = DicIceLodeStarAward[key];
            int Lv = DayLv;
            if (Lv >= Dic.MinLv && Lv <= Dic.MaxLv)
            {
                IceLodeStarAwardList.Add(Dic);
            }
        }
    }
    private void  IsShowRedPoint()//是否显示红点
    {
        bool Isbool = false;
        for (int i = 0; i < IceLodeStarAwardList.Count; i++)
        {
            IceLodeStarAwardClass IceLode = IceLodeStarAwardList[i];
            int All_star = GetAllStar();
            bool _bool = MathUtility.GetBitValue((uint)AwardRecord, (ushort)IceLode.Index);
            if (All_star >= IceLode.Star && !_bool)
            {
                Isbool = true;
            }
        }
        if (Isbool)
        {
            Redpoint.state = RedPointState.Simple;
        }
        else
        {
            Redpoint.state = RedPointState.None;
        }
    }
}
System/Dungeon/IceCrystalVeinWin.cs
@@ -109,7 +109,7 @@
        private void dungeonRecordChangeEvent(int fbId)
        {
            if (fbId == 31140)
            if (fbId == IceCrystalVeinModel.ICECRYSTALVEIN_MAPID)
            {
                StarAll = iceCrystalVeinModel.GetAllStar();
                SetGridBotton();