| | |
| | | //冰晶矿脉新
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | using Snxxz.UI;
|
| | |
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class IceLodeStarAwardClass
|
| | |
| | | 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 = FuncConfigConfig.Get("IceLodeCfg");
|
| | |
| | |
|
| | | private void dungeonRecordChangeEvent(int fbId)
|
| | | {
|
| | | if (fbId == ICECRYSTALVEIN_MAPID)
|
| | | {
|
| | | IsShowRedPoint();
|
| | | }
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | {
|
| | | model.dungeonRecordChangeEvent += dungeonRecordChangeEvent;
|
| | | AddIceLodeStarAwardList();
|
| | | IsShowRedPoint();
|
| | | }
|
| | |
|
| | | private void Assignment()
|
| | |
| | | HasSweep = (int)info.HasSweep;
|
| | | DayLv = (int)info.DayLV;
|
| | | AddIceLodeStarAwardList();
|
| | | IsShowRedPoint();
|
| | | if (UpdateIceLodeInf != null)
|
| | | {
|
| | | UpdateIceLodeInf();
|
| | |
| | | public bool IsFree(int Index)
|
| | | {
|
| | | DungeonRecord dungeonRecord;
|
| | | if (model.TryGetRecord(31140, out dungeonRecord))
|
| | | if (model.TryGetRecord(ICECRYSTALVEIN_MAPID, out dungeonRecord))
|
| | | {
|
| | | if (dungeonRecord.lineGrades.ContainsKey(Index))
|
| | | {
|
| | |
| | | {
|
| | | 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;
|
| | | }
|
| | | }
|
| | | }
|