| | |
| | | //<轮回类型,功能ID>
|
| | | public Dictionary<int, int> funcIdDict = new Dictionary<int, int>();
|
| | |
|
| | | // <轮回类型,上次的 CurRound>
|
| | | private Dictionary<int, int> lastCurRoundDict = new Dictionary<int, int>();
|
| | |
|
| | | // <轮回类型,上次的 CurValue>
|
| | | private Dictionary<int, int> lastCurValueDict = new Dictionary<int, int>();
|
| | |
|
| | | public const int activityType = (int)OpenServerActivityCenter.ActivityType.AT_Activity2;
|
| | | public const int activityID = (int)NewDayActivityID.CycleHallAct;
|
| | | public static Operation operaType = Operation.default47;
|
| | |
|
| | | public int actNum = 10; //对应界面
|
| | | public event Action UpdatePlayerInfoAction;
|
| | |
|
| | | public int newRoundType;
|
| | | public int newAwardType;
|
| | | public int newAwardTypeValue;
|
| | | public int newAwardIndex;
|
| | | public event Action UpdateNewAwardHave;
|
| | | StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | |
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | playerInfoDict.Clear();
|
| | | lastCurRoundDict.Clear();
|
| | | lastCurValueDict.Clear();
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void CheckNewAwardHave(int roundType, int curRound, int curValue)
|
| | | {
|
| | | if (lastCurRoundDict.ContainsKey(roundType) && lastCurValueDict.ContainsKey(roundType))
|
| | | {
|
| | | int lastCurRound = lastCurRoundDict[roundType];
|
| | | int lastCurValue = lastCurValueDict[roundType];
|
| | | if (lastCurRound < curRound)
|
| | | {
|
| | | lastCurValueDict[roundType] = 0;
|
| | | }
|
| | |
|
| | | lastCurValue = lastCurValueDict[roundType];
|
| | | if (lastCurValue < curValue)
|
| | | {
|
| | | var act = GetOperationInfo();
|
| | | if (act != null && act.TryGetRound(roundType, out var round) && round.AwardList != null)
|
| | | {
|
| | | for (int i = 0; i < round.AwardList.Length; i++)
|
| | | {
|
| | | var Award = round.AwardList[i];
|
| | | int state = GetAwardState(roundType, Award.AwardIndex);
|
| | | if (Award.NeedValue > lastCurValue && Award.NeedValue <= curValue && state == 1)
|
| | | {
|
| | | newRoundType = roundType;
|
| | | newAwardType = round.AwardType;
|
| | | newAwardTypeValue = (int)round.AwardTypeValue;
|
| | | newAwardIndex = Award.AwardIndex;
|
| | | if (!DTC0403_tagPlayerLoginLoadOK.neverLoginOk && !WindowCenter.Instance.IsOpen<CycleHallAchievementTipWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<CycleHallAchievementTipWin>();
|
| | | }
|
| | | UpdateNewAwardHave?.Invoke();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | lastCurRoundDict[roundType] = curRound;
|
| | | lastCurValueDict[roundType] = curValue;
|
| | | }
|
| | |
|
| | | public void UpdatePlayerInfo(HAA89_tagMCActLunhuidianPlayerInfo netPack)
|
| | | {
|
| | | if (actNum != netPack.ActNum)
|
| | |
| | | playerInfoDict[netPack.RoundType].CurRound = netPack.CurRound;
|
| | | playerInfoDict[netPack.RoundType].CurValue = netPack.CurValue;
|
| | | playerInfoDict[netPack.RoundType].AwardRecord = netPack.AwardRecord;
|
| | | CheckNewAwardHave(netPack.RoundType, (int)netPack.CurRound, (int)netPack.CurValue);
|
| | | UpdatePlayerInfoAction?.Invoke();
|
| | | UpdateRedpoint();
|
| | | }
|