| | |
| | | {
|
| | | 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;//是否已扫荡
|
| | |
| | | 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");
|
| | |
| | | }
|
| | | 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()
|
| | |
| | | AwardRecord = (int)info.AwardRecord;
|
| | | HasSweep = (int)info.HasSweep;
|
| | | DayLv = (int)info.DayLV;
|
| | | AddIceLodeStarAwardList();
|
| | | IsShowRedPoint();
|
| | | if (UpdateIceLodeInf != null)
|
| | | {
|
| | | UpdateIceLodeInf();
|
| | |
| | | }
|
| | | 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;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | |