public override void SetPhaseMarks(ulong mask) { for (int i = 0; i < base.PhaseList.Count; i++) { ExeTaskPhase phaseById = this.GetPhaseById(i); if (phaseById != null) { phaseById.Marked = (mask & (((ulong)1L) << i)) > 0L; } } base.NotifyMaskStateChanged(); }
public ExeTaskPhase GetPhaseById(int id) { for (int i = 0; i < base.PhaseList.Count; i++) { ExeTaskPhase phase = base.PhaseList[i] as ExeTaskPhase; if ((phase != null) && (phase.FakeID == id)) { return(phase); } } return(null); }
public void LoadInfo(COMDT_WEAL_CON_DATA_DETAIL conData) { for (int i = 0; i < base.PhaseList.Count; i++) { ExeTaskPhase exeTaskPhase = (ExeTaskPhase)base.PhaseList[i]; exeTaskPhase.SetAchiveve((conData.dwReachMask & 1u << i) > 0u, (conData.dwLimitReachMask & 1u << i) > 0u); if (i < (int)conData.wConNum) { exeTaskPhase.SetCurrent((int)conData.astConData[i].dwValue); } } base.SetPhaseMarks((ulong)conData.dwRewardMask); }
public ExeTaskActivity(ActivitySys mgr, ResWealCondition config) : base(mgr, config.stCommon) { this._config = config; for (ushort i = 0; (i < this._config.wConNum) && (i < this._config.astConInfo.Length); i = (ushort)(i + 1)) { ExeTaskPhase ap = new ExeTaskPhase(this, i, this._config.astConInfo[i]); base.AddPhase(ap); if (this._config.astConInfo[i].dwConType == 14) { mgr.IsShareTask = true; } } }
public ExeTaskActivity(ActivitySys mgr, ResWealCondition config) : base(mgr, config.stCommon) { this._config = config; ushort num = 0; while (num < this._config.wConNum && (int)num < this._config.astConInfo.Length) { ExeTaskPhase ap = new ExeTaskPhase(this, (uint)num, this._config.astConInfo[(int)num]); base.AddPhase(ap); if (this._config.astConInfo[(int)num].dwConType == 14u) { mgr.IsShareTask = true; } num += 1; } }
public void DrawReward() { CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x9c7); msg.stPkgData.stDrawWealReq.bWealType = (byte)this._owner.Type; msg.stPkgData.stDrawWealReq.dwWealID = this._owner.ID; uint iD = this.ID; ExeTaskPhase phase = this as ExeTaskPhase; if (phase != null) { ExeTaskActivity owner = phase.Owner as ExeTaskActivity; if ((owner != null) && owner.IsSingleConfig()) { iD = phase.FakeID; } } msg.stPkgData.stDrawWealReq.dwPeriodID = iD; Singleton <NetworkModule> .GetInstance().SendLobbyMsg(ref msg, true); }
public ExeTaskActivity(ActivitySys mgr, ResWealCondition config) : base(mgr, config.stCommon) { this._config = config; if (this._config.bTrigType == 1) { for (int i = this._config.wConNum - 1; i >= 0; i--) { ExeTaskPhase ap = new ExeTaskPhase(this, (uint)((this._config.wConNum - 1) - i), this._config.astConInfo[i]); base.AddPhase(ap); } } else { for (ushort j = 0; (j < this._config.wConNum) && (j < this._config.astConInfo.Length); j = (ushort)(j + 1)) { ExeTaskPhase phase2 = new ExeTaskPhase(this, j, this._config.astConInfo[j]); base.AddPhase(phase2); } } }
public void LoadInfo(COMDT_WEAL_CON_DATA_DETAIL conData) { for (int i = 0; i < base.PhaseList.Count; i++) { int id = 0; if (this._config.bTrigType != 1) { id = i; } else { id = (conData.wConNum - i) - 1; } if ((id < conData.wConNum) && (id >= 0)) { ExeTaskPhase phaseById = this.GetPhaseById(id); phaseById.SetAchiveve((conData.dwReachMask & (((int)1) << id)) > 0, (conData.dwLimitReachMask & (((int)1) << id)) > 0); phaseById.SetCurrent((int)conData.astConData[id].dwValue); } } this.SetPhaseMarks((ulong)conData.dwRewardMask); }