public void OnServerAchieveInfo(ref COMDT_ACHIEVEMENT_INFO svrAchieveInfo) { int[] array = new int[61]; int num = 0; while ((long)num < (long)((ulong)svrAchieveInfo.dwDoneTypeNum)) { uint dwDoneType = svrAchieveInfo.astDoneData[num].dwDoneType; array[(int)((uint)((UIntPtr)dwDoneType))] = svrAchieveInfo.astDoneData[num].iDoneCnt; num++; } num = 0; while ((long)num < (long)((ulong)svrAchieveInfo.dwAchievementNum)) { uint dwID = svrAchieveInfo.astAchievementData[num].dwID; uint dwDoneTime = svrAchieveInfo.astAchievementData[num].dwDoneTime; COM_ACHIEVEMENT_STATE bState = (COM_ACHIEVEMENT_STATE)svrAchieveInfo.astAchievementData[num].bState; if (this.m_AchiveItemDic.ContainsKey(dwID)) { this.m_AchiveItemDic[dwID].DoneTime = dwDoneTime; this.m_AchiveItemDic[dwID].State = bState; if (this.m_AchiveItemDic[dwID].DoneType >= RES_ACHIEVE_DONE_TYPE.RES_ACHIEVE_DONE_GET_GOLD && this.m_AchiveItemDic[dwID].DoneType < (RES_ACHIEVE_DONE_TYPE)array.Length) { this.m_AchiveItemDic[dwID].DoneCnt = array[(int)this.m_AchiveItemDic[dwID].DoneType]; } } num++; } this.OnServerTrophy(ref svrAchieveInfo.stTrophyLvlInfo); this.SetSelectedTrophies(ref svrAchieveInfo.ShowAchievement); }
public void InitStateData(COMDT_ACHIEVEMENT_DATA stateInfo) { this.m_cfgId = stateInfo.dwID; this.m_state = (COM_ACHIEVEMENT_STATE)stateInfo.bState; this.m_cfgInfo = GameDataMgr.achieveDatabin.GetDataByKey(this.m_cfgId); if (this.m_cfgInfo != null) { this.m_doneType = (RES_ACHIEVE_DONE_TYPE)this.m_cfgInfo.dwDoneType; } }
public CAchieveItem2(ref ResAchievement achievement) { this.ID = achievement.dwID; this.DoneTime = 0u; this.State = 0; this.DoneType = achievement.dwDoneType; this.Cfg = achievement; this.PrevID = achievement.dwPreAchievementID; this.DoneCnt = 0; }
public CAchieveItem2 GetHeadAndSetFinishRecursively(uint doneTime) { this.State = 1; this.DoneTime = doneTime; if (this.Prev != null) { return(this.Prev.GetHeadAndSetFinishRecursively(doneTime)); } return(this); }
public CAchieveItem2(ref ResAchievement achievement) { this.ID = achievement.dwID; this.DoneTime = 0u; this.State = COM_ACHIEVEMENT_STATE.COM_ACHIEVEMENT_STATE_UNFIN; this.DoneType = (RES_ACHIEVE_DONE_TYPE)achievement.dwDoneType; this.Cfg = achievement; this.PrevID = achievement.dwPreAchievementID; this.DoneCnt = 0; }
public CAchieveItem2 GetHeadAndSetFinishRecursively(uint doneTime) { this.State = COM_ACHIEVEMENT_STATE.COM_ACHIEVEMENT_STATE_FIN; this.DoneTime = doneTime; if (this.Prev != null) { return(this.Prev.GetHeadAndSetFinishRecursively(doneTime)); } return(this); }
public void InitStateData(COMDT_ACHIEVEMENT_DATA stateInfo) { this.m_cfgId = stateInfo.dwID; this.m_state = stateInfo.bState; this.m_cfgInfo = GameDataMgr.achieveDatabin.GetDataByKey(this.m_cfgId); if (this.m_cfgInfo == null) { return; } this.m_doneType = this.m_cfgInfo.dwDoneType; }
public void SetAchieveState(COM_ACHIEVEMENT_STATE stateVal) { this.m_state = stateVal; }