public void RecordMvp(COMDT_GAME_INFO gameInfo) { this.m_winMvpId = gameInfo.dwWinMvpObjID; this.m_loseMvpId = gameInfo.dwLoseMvpObjID; this._mvpScore.Clear(); COMDT_MVP_SCORE_DETAIL stMvpScoreDetail = gameInfo.stMvpScoreDetail; for (int i = 0; i < (int)stMvpScoreDetail.bAcntNum; i++) { this._mvpScore.Add(stMvpScoreDetail.astMvpScoreDetail[i].dwObjID, stMvpScoreDetail.astMvpScoreDetail[i].iMvpScoreTTH); } this._useServerMvpScore = true; }
public void CalculateKDA(COMDT_GAME_INFO gameInfo) { CRoleInfo masterRoleInfo = this.GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "masterRoleInfo is null"); if (masterRoleInfo != null) { PlayerKDA hostKDA = Singleton <BattleStatistic> .GetInstance().m_playerKDAStat.GetHostKDA(); if (hostKDA != null) { int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; int num5 = 0; int num6 = 0; int num7 = 0; int num8 = 0; int num9 = 0; int num10 = 0; int num11 = 0; int num12 = 0; ListView <HeroKDA> .Enumerator enumerator = hostKDA.GetEnumerator(); while (enumerator.MoveNext()) { if (enumerator.Current != null) { num += enumerator.Current.LegendaryNum; num2 += enumerator.Current.PentaKillNum; num3 += enumerator.Current.QuataryKillNum; num4 += enumerator.Current.TripleKillNum; num5 += enumerator.Current.DoubleKillNum; num8 += !enumerator.Current.bHurtMost ? 0 : 1; num9 += !enumerator.Current.bHurtTakenMost ? 0 : 1; num10 += !enumerator.Current.bGetCoinMost ? 0 : 1; num11 += !enumerator.Current.bAsssistMost ? 0 : 1; num12 += !enumerator.Current.bKillMost ? 0 : 1; } } if (gameInfo.bGameResult == 1) { uint mvpPlayer = Singleton <BattleStatistic> .instance.GetMvpPlayer(hostKDA.PlayerCamp, true); if (mvpPlayer != 0) { num6 = (mvpPlayer != hostKDA.PlayerId) ? 0 : 1; } } else if (gameInfo.bGameResult == 2) { uint num14 = Singleton <BattleStatistic> .instance.GetMvpPlayer(hostKDA.PlayerCamp, false); if (num14 != 0) { num7 = (num14 != hostKDA.PlayerId) ? 0 : 1; } } bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; bool flag5 = false; bool flag6 = false; bool flag7 = false; bool flag8 = false; bool flag9 = false; bool flag10 = false; bool flag11 = false; bool flag12 = false; int index = 0; ListView <COMDT_STATISTIC_KEY_VALUE_INFO> inList = new ListView <COMDT_STATISTIC_KEY_VALUE_INFO>(); while (index < masterRoleInfo.pvpDetail.stKVDetail.dwNum) { COMDT_STATISTIC_KEY_VALUE_INFO comdt_statistic_key_value_info = masterRoleInfo.pvpDetail.stKVDetail.astKVDetail[index]; switch (comdt_statistic_key_value_info.dwKey) { case 13: comdt_statistic_key_value_info.dwValue += (uint)num6; flag6 = true; break; case 14: comdt_statistic_key_value_info.dwValue += (uint)num7; flag7 = true; break; case 15: comdt_statistic_key_value_info.dwValue += (uint)num; flag5 = true; break; case 0x10: comdt_statistic_key_value_info.dwValue += (uint)num5; flag = true; break; case 0x11: comdt_statistic_key_value_info.dwValue += (uint)num4; flag2 = true; break; case 0x1b: comdt_statistic_key_value_info.dwValue += (uint)num3; flag3 = true; break; case 0x1c: comdt_statistic_key_value_info.dwValue += (uint)num2; flag4 = true; break; case 0x1d: comdt_statistic_key_value_info.dwValue += (uint)num8; flag8 = true; break; case 30: comdt_statistic_key_value_info.dwValue += (uint)num10; flag10 = true; break; case 0x1f: comdt_statistic_key_value_info.dwValue += (uint)num9; flag9 = true; break; case 0x20: comdt_statistic_key_value_info.dwValue += (uint)num11; flag11 = true; break; case 0x21: comdt_statistic_key_value_info.dwValue += (uint)num12; flag12 = true; break; } index++; } COMDT_STATISTIC_KEY_VALUE_INFO item = null; if (!flag) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x10, dwValue = (uint)num5 }; inList.Add(item); } if (!flag2) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x11, dwValue = (uint)num4 }; inList.Add(item); } if (!flag3) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x1b, dwValue = (uint)num3 }; inList.Add(item); } if (!flag4) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x1c, dwValue = (uint)num2 }; inList.Add(item); } if (!flag5) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 15, dwValue = (uint)num }; inList.Add(item); } if (!flag6) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 13, dwValue = (uint)num6 }; inList.Add(item); } if (!flag7) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 14, dwValue = (uint)num7 }; inList.Add(item); } if (!flag8) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x1d, dwValue = (uint)num8 }; inList.Add(item); } if (!flag9) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x1f, dwValue = (uint)num9 }; inList.Add(item); } if (!flag10) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 30, dwValue = (uint)num10 }; inList.Add(item); } if (!flag11) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x20, dwValue = (uint)num11 }; inList.Add(item); } if (!flag12) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x21, dwValue = (uint)num12 }; inList.Add(item); } if (inList.Count > 0) { masterRoleInfo.pvpDetail.stKVDetail.dwNum += (uint)inList.Count; inList.AddRange(masterRoleInfo.pvpDetail.stKVDetail.astKVDetail); masterRoleInfo.pvpDetail.stKVDetail.astKVDetail = LinqS.ToArray <COMDT_STATISTIC_KEY_VALUE_INFO>(inList); } } } }
public void CalculateKDA(COMDT_GAME_INFO gameInfo) { CRoleInfo masterRoleInfo = this.GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "masterRoleInfo is null"); if (masterRoleInfo != null) { PlayerKDA hostKDA = Singleton <BattleStatistic> .GetInstance().m_playerKDAStat.GetHostKDA(); if (hostKDA != null) { int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; int num5 = 0; int num6 = 0; int num7 = 0; IEnumerator <HeroKDA> enumerator = hostKDA.GetEnumerator(); while (enumerator.MoveNext()) { if (enumerator.Current != null) { num += enumerator.Current.LegendaryNum; num2 += enumerator.Current.PentaKillNum; num3 += enumerator.Current.QuataryKillNum; num4 += enumerator.Current.TripleKillNum; num5 += enumerator.Current.DoubleKillNum; } } if (gameInfo.bGameResult == 1) { uint mvpPlayer = Singleton <BattleStatistic> .instance.GetMvpPlayer(hostKDA.PlayerCamp, true); if (mvpPlayer != 0) { num6 = (mvpPlayer != hostKDA.PlayerId) ? 0 : 1; } } else if (gameInfo.bGameResult == 2) { uint num9 = Singleton <BattleStatistic> .instance.GetMvpPlayer(hostKDA.PlayerCamp, false); if (num9 != 0) { num7 = (num9 != hostKDA.PlayerId) ? 0 : 1; } } bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; bool flag5 = false; bool flag6 = false; bool flag7 = false; int index = 0; ListView <COMDT_STATISTIC_KEY_VALUE_INFO> inList = new ListView <COMDT_STATISTIC_KEY_VALUE_INFO>(); while (index < masterRoleInfo.pvpDetail.stKVDetail.dwNum) { COMDT_STATISTIC_KEY_VALUE_INFO comdt_statistic_key_value_info = masterRoleInfo.pvpDetail.stKVDetail.astKVDetail[index]; switch (((RES_STATISTIC_SETTLE_DATA_TYPE)comdt_statistic_key_value_info.dwKey)) { case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_MVP_CNT: comdt_statistic_key_value_info.dwValue += (uint)num6; flag6 = true; break; case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_LOSE_SOUL: comdt_statistic_key_value_info.dwValue += (uint)num7; flag7 = true; break; case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_GODLIKE_CNT: comdt_statistic_key_value_info.dwValue += (uint)num; flag5 = true; break; case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_DOUBLE_KILL_CNT: comdt_statistic_key_value_info.dwValue += (uint)num5; flag = true; break; case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_TRIPLE_KILL_CNT: comdt_statistic_key_value_info.dwValue += (uint)num4; flag2 = true; break; case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_QUATARY_KILL_CNT: comdt_statistic_key_value_info.dwValue += (uint)num3; flag3 = true; break; case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_PENTA_KILL_CNT: comdt_statistic_key_value_info.dwValue += (uint)num2; flag4 = true; break; } index++; } COMDT_STATISTIC_KEY_VALUE_INFO item = null; if (!flag) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x10, dwValue = (uint)num5 }; inList.Add(item); } if (!flag2) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x11, dwValue = (uint)num4 }; inList.Add(item); } if (!flag3) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x1b, dwValue = (uint)num3 }; inList.Add(item); } if (!flag4) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 0x1c, dwValue = (uint)num2 }; inList.Add(item); } if (!flag5) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 15, dwValue = (uint)num }; inList.Add(item); } if (!flag6) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 13, dwValue = (uint)num6 }; inList.Add(item); } if (!flag7) { item = new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 14, dwValue = (uint)num7 }; inList.Add(item); } if (inList.Count > 0) { masterRoleInfo.pvpDetail.stKVDetail.dwNum += (uint)inList.Count; inList.AddRange(masterRoleInfo.pvpDetail.stKVDetail.astKVDetail); masterRoleInfo.pvpDetail.stKVDetail.astKVDetail = LinqS.ToArray <COMDT_STATISTIC_KEY_VALUE_INFO>(inList); } } } }
public void RecordMvp(COMDT_GAME_INFO gameInfo) { this.m_winMvpId = gameInfo.dwWinMvpObjID; this.m_loseMvpId = gameInfo.dwLoseMvpObjID; }
public static void SetMasterPvpDetailWhenGameSettle(COMDT_GAME_INFO gameInfo) { byte bMaxAcntNum; byte bGameType = gameInfo.bGameType; byte bMapType = gameInfo.bMapType; uint iLevelID = (uint)gameInfo.iLevelID; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "masterRoleInfo is null"); if (masterRoleInfo == null) { return; } switch (((COM_GAME_TYPE)bGameType)) { case COM_GAME_TYPE.COM_SINGLE_GAME_OF_COMBAT: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stVsMachineInfo, gameInfo.bGameResult); return; case COM_GAME_TYPE.COM_SINGLE_GAME_OF_GUIDE: case COM_GAME_TYPE.COM_SINGLE_GAME_OF_ACTIVITY: case COM_GAME_TYPE.COM_MULTI_GAME_OF_PVP_ROOM: case COM_GAME_TYPE.COM_SINGLE_GAME_OF_BURNING: case COM_GAME_TYPE.COM_SINGLE_GAME_OF_ARENA: return; case COM_GAME_TYPE.COM_MULTI_GAME_OF_LADDER: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stLadderInfo, gameInfo.bGameResult); Singleton <CRoleInfoManager> .instance.CalculateKDA(gameInfo); return; case COM_GAME_TYPE.COM_MULTI_GAME_OF_PVP_MATCH: case COM_GAME_TYPE.COM_MULTI_GAME_OF_REWARDMATCH: if (gameInfo.bIsPKAI != 2) { bMaxAcntNum = CLevelCfgLogicManager.GetPvpMapCommonInfo(bMapType, iLevelID).bMaxAcntNum; switch (bMaxAcntNum) { case 2: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stOneVsOneInfo, gameInfo.bGameResult); goto Label_0183; case 4: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stTwoVsTwoInfo, gameInfo.bGameResult); goto Label_0183; case 6: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stThreeVsThreeInfo, gameInfo.bGameResult); goto Label_0183; } break; } Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stVsMachineInfo, gameInfo.bGameResult); return; case COM_GAME_TYPE.COM_MULTI_GAME_OF_ENTERTAINMENT: if (gameInfo.bIsPKAI == 1) { Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stEntertainmentInfo, gameInfo.bGameResult); Singleton <CRoleInfoManager> .instance.CalculateKDA(gameInfo); } return; default: return; } if (bMaxAcntNum == 10) { Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stFiveVsFiveInfo, gameInfo.bGameResult); } Label_0183: Singleton <CRoleInfoManager> .instance.CalculateKDA(gameInfo); }
public static void SetMasterPvpDetailWhenGameSettle(COMDT_GAME_INFO gameInfo) { byte bGameType = gameInfo.bGameType; byte bMapType = gameInfo.bMapType; uint iLevelID = (uint)gameInfo.iLevelID; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "masterRoleInfo is null"); if (masterRoleInfo == null) { return; } switch (bGameType) { case 1: Singleton <CRoleInfoManager> .get_instance().CalculateWins(masterRoleInfo.pvpDetail.stVsMachineInfo, (int)gameInfo.bGameResult); break; case 4: Singleton <CRoleInfoManager> .get_instance().CalculateWins(masterRoleInfo.pvpDetail.stLadderInfo, (int)gameInfo.bGameResult); Singleton <CRoleInfoManager> .get_instance().CalculateKDA(gameInfo); break; case 5: case 10: if (gameInfo.bIsPKAI == 2) { Singleton <CRoleInfoManager> .get_instance().CalculateWins(masterRoleInfo.pvpDetail.stVsMachineInfo, (int)gameInfo.bGameResult); } else { byte bMaxAcntNum = CLevelCfgLogicManager.GetPvpMapCommonInfo(bMapType, iLevelID).bMaxAcntNum; byte b = bMaxAcntNum; switch (b) { case 2: Singleton <CRoleInfoManager> .get_instance().CalculateWins(masterRoleInfo.pvpDetail.stOneVsOneInfo, (int)gameInfo.bGameResult); goto IL_183; case 3: case 5: IL_F1: if (b != 10) { goto IL_183; } Singleton <CRoleInfoManager> .get_instance().CalculateWins(masterRoleInfo.pvpDetail.stFiveVsFiveInfo, (int)gameInfo.bGameResult); goto IL_183; case 4: Singleton <CRoleInfoManager> .get_instance().CalculateWins(masterRoleInfo.pvpDetail.stTwoVsTwoInfo, (int)gameInfo.bGameResult); goto IL_183; case 6: Singleton <CRoleInfoManager> .get_instance().CalculateWins(masterRoleInfo.pvpDetail.stThreeVsThreeInfo, (int)gameInfo.bGameResult); goto IL_183; } goto IL_F1; IL_183: Singleton <CRoleInfoManager> .get_instance().CalculateKDA(gameInfo); } break; case 9: if (gameInfo.bIsPKAI == 1) { Singleton <CRoleInfoManager> .get_instance().CalculateWins(masterRoleInfo.pvpDetail.stEntertainmentInfo, (int)gameInfo.bGameResult); Singleton <CRoleInfoManager> .get_instance().CalculateKDA(gameInfo); } break; } }
public void CalculateKDA(COMDT_GAME_INFO gameInfo) { CRoleInfo masterRoleInfo = this.GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "masterRoleInfo is null"); if (masterRoleInfo == null) { return; } PlayerKDA hostKDA = Singleton <BattleStatistic> .GetInstance().m_playerKDAStat.GetHostKDA(); if (hostKDA != null) { int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; int num5 = 0; int num6 = 0; int num7 = 0; int num8 = 0; int num9 = 0; int num10 = 0; int num11 = 0; int num12 = 0; ListView <HeroKDA> .Enumerator enumerator = hostKDA.GetEnumerator(); while (enumerator.MoveNext()) { if (enumerator.get_Current() != null) { num += enumerator.get_Current().LegendaryNum; num2 += enumerator.get_Current().PentaKillNum; num3 += enumerator.get_Current().QuataryKillNum; num4 += enumerator.get_Current().TripleKillNum; num5 += enumerator.get_Current().DoubleKillNum; num8 += ((!enumerator.get_Current().bHurtMost) ? 0 : 1); num9 += ((!enumerator.get_Current().bHurtTakenMost) ? 0 : 1); num10 += ((!enumerator.get_Current().bGetCoinMost) ? 0 : 1); num11 += ((!enumerator.get_Current().bAsssistMost) ? 0 : 1); num12 += ((!enumerator.get_Current().bKillMost) ? 0 : 1); } } if (gameInfo.bGameResult == 1) { uint mvpPlayer = Singleton <BattleStatistic> .get_instance().GetMvpPlayer(hostKDA.PlayerCamp, true); if (mvpPlayer != 0u) { num6 = ((mvpPlayer != hostKDA.PlayerId) ? 0 : 1); } } else if (gameInfo.bGameResult == 2) { uint mvpPlayer2 = Singleton <BattleStatistic> .get_instance().GetMvpPlayer(hostKDA.PlayerCamp, false); if (mvpPlayer2 != 0u) { num7 = ((mvpPlayer2 != hostKDA.PlayerId) ? 0 : 1); } } bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; bool flag5 = false; bool flag6 = false; bool flag7 = false; bool flag8 = false; bool flag9 = false; bool flag10 = false; bool flag11 = false; bool flag12 = false; int num13 = 0; ListView <COMDT_STATISTIC_KEY_VALUE_INFO> listView = new ListView <COMDT_STATISTIC_KEY_VALUE_INFO>(); while ((long)num13 < (long)((ulong)masterRoleInfo.pvpDetail.stKVDetail.dwNum)) { COMDT_STATISTIC_KEY_VALUE_INFO cOMDT_STATISTIC_KEY_VALUE_INFO = masterRoleInfo.pvpDetail.stKVDetail.astKVDetail[num13]; switch (cOMDT_STATISTIC_KEY_VALUE_INFO.dwKey) { case 13u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num6; flag6 = true; break; case 14u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num7; flag7 = true; break; case 15u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num; flag5 = true; break; case 16u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num5; flag = true; break; case 17u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num4; flag2 = true; break; case 27u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num3; flag3 = true; break; case 28u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num2; flag4 = true; break; case 29u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num8; flag8 = true; break; case 30u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num10; flag10 = true; break; case 31u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num9; flag9 = true; break; case 32u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num11; flag11 = true; break; case 33u: cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue += (uint)num12; flag12 = true; break; } num13++; } if (!flag) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 16u, dwValue = (uint)num5 }); } if (!flag2) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 17u, dwValue = (uint)num4 }); } if (!flag3) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 27u, dwValue = (uint)num3 }); } if (!flag4) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 28u, dwValue = (uint)num2 }); } if (!flag5) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 15u, dwValue = (uint)num }); } if (!flag6) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 13u, dwValue = (uint)num6 }); } if (!flag7) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 14u, dwValue = (uint)num7 }); } if (!flag8) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 29u, dwValue = (uint)num8 }); } if (!flag9) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 31u, dwValue = (uint)num9 }); } if (!flag10) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 30u, dwValue = (uint)num10 }); } if (!flag11) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 32u, dwValue = (uint)num11 }); } if (!flag12) { listView.Add(new COMDT_STATISTIC_KEY_VALUE_INFO { dwKey = 33u, dwValue = (uint)num12 }); } if (listView.get_Count() > 0) { masterRoleInfo.pvpDetail.stKVDetail.dwNum += (uint)listView.get_Count(); listView.AddRange(masterRoleInfo.pvpDetail.stKVDetail.astKVDetail); masterRoleInfo.pvpDetail.stKVDetail.astKVDetail = LinqS.ToArray <COMDT_STATISTIC_KEY_VALUE_INFO>(listView); } } }
public static void SetMasterPvpDetailWhenGameSettle(COMDT_GAME_INFO gameInfo) { byte num5; byte bGameType = gameInfo.bGameType; byte bMapType = gameInfo.bMapType; uint iLevelID = (uint)gameInfo.iLevelID; byte bMaxAcntNum = 0; CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo(); DebugHelper.Assert(masterRoleInfo != null, "masterRoleInfo is null"); if (masterRoleInfo == null) { return; } switch (((COM_GAME_TYPE)bGameType)) { case COM_GAME_TYPE.COM_SINGLE_GAME_OF_COMBAT: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stVsMachineInfo, gameInfo.bGameResult); return; case COM_GAME_TYPE.COM_SINGLE_GAME_OF_GUIDE: case COM_GAME_TYPE.COM_SINGLE_GAME_OF_ACTIVITY: case COM_GAME_TYPE.COM_MULTI_GAME_OF_PVP_ROOM: case COM_GAME_TYPE.COM_SINGLE_GAME_OF_BURNING: case COM_GAME_TYPE.COM_SINGLE_GAME_OF_ARENA: return; case COM_GAME_TYPE.COM_MULTI_GAME_OF_LADDER: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stLadderInfo, gameInfo.bGameResult); Singleton <CRoleInfoManager> .instance.CalculateKDA(gameInfo); return; case COM_GAME_TYPE.COM_MULTI_GAME_OF_PVP_MATCH: case COM_GAME_TYPE.COM_MULTI_GAME_OF_REWARDMATCH: if (gameInfo.bIsPKAI != 2) { switch (bMapType) { case 1: case 4: { ResAcntBattleLevelInfo dataByKey = GameDataMgr.pvpLevelDatabin.GetDataByKey(iLevelID); DebugHelper.Assert(dataByKey != null, "ResAcntBattleLevelInfo is null"); if (dataByKey == null) { return; } bMaxAcntNum = dataByKey.stLevelCommonInfo.bMaxAcntNum; goto Label_0192; } case 3: { ResRankLevelInfo info3 = GameDataMgr.rankLevelDatabin.GetDataByKey(iLevelID); DebugHelper.Assert(info3 != null, "ResRankLevelInfo is null"); if (info3 == null) { return; } bMaxAcntNum = info3.stLevelCommonInfo.bMaxAcntNum; goto Label_0192; } case 5: { ResRewardMatchLevelInfo info4 = GameDataMgr.uinionBattleLevelDatabin.GetDataByKey(iLevelID); DebugHelper.Assert(info4 != null, "ResRankLevelInfo is null"); if (info4 == null) { return; } bMaxAcntNum = info4.stLevelCommonInfo.bMaxAcntNum; goto Label_0192; } } break; } Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stVsMachineInfo, gameInfo.bGameResult); return; case COM_GAME_TYPE.COM_MULTI_GAME_OF_ENTERTAINMENT: if (gameInfo.bIsPKAI == 1) { Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stEntertainmentInfo, gameInfo.bGameResult); Singleton <CRoleInfoManager> .instance.CalculateKDA(gameInfo); } return; default: return; } Label_0192: num5 = bMaxAcntNum; switch (num5) { case 2: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stOneVsOneInfo, gameInfo.bGameResult); break; case 4: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stTwoVsTwoInfo, gameInfo.bGameResult); break; case 6: Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stThreeVsThreeInfo, gameInfo.bGameResult); break; default: if (num5 == 10) { Singleton <CRoleInfoManager> .instance.CalculateWins(masterRoleInfo.pvpDetail.stFiveVsFiveInfo, gameInfo.bGameResult); } break; } Singleton <CRoleInfoManager> .instance.CalculateKDA(gameInfo); }