Esempio n. 1
0
        public int GameFuBenComplete_ZorkBattle(ZorkBattleStatisticalData data)
        {
            int result = 0;

            try
            {
                lock (this.Mutex)
                {
                    KuaFu5v5FuBenData fubenData;
                    if (!this.FuBenDataDict.TryGetValue(data.GameId, out fubenData))
                    {
                        result = -4000;
                        return(result);
                    }
                    ClientAgentManager.Instance().RemoveKfFuben(this.GameType, fubenData.ServerId, (long)data.GameId);
                    this.FuBenDataDict.Remove(data.GameId);
                    foreach (KeyValuePair <int, int> item in fubenData.ZhanDuiDict)
                    {
                        this.ZhanDuiIDVsGameIDDict.Remove(item.Key);
                    }
                    foreach (KeyValuePair <int, TianTi5v5ZhanDuiData> item2 in data.ZhanDuiDict)
                    {
                        TianTi5v5ZhanDuiData zhanduiData = item2.Value;
                        TianTi5v5Service.UpdateZorkZhanDuiData(zhanduiData);
                    }
                    foreach (ZorkBattleRoleInfo client in data.ClientContextDataList)
                    {
                        this.Persistence.UpdateZorkBattleRoleData(client, true);
                    }
                    string zhanduiIdArray = string.Join <int>("|", data.ZhanDuiDict.Keys.ToArray <int>());
                    string strLog         = string.Format("Zork::GameFuBenComplete_ZorkBattle SeasonID:{0} GameID:{1} ZhanDuiIDWin:{2} ZhanDuiID:{3} Round:{2} ZhanDuiInfo:", new object[]
                    {
                        this.CurrentSeasonID,
                        data.GameId,
                        data.ZhanDuiIDWin,
                        zhanduiIdArray,
                        this.CurrentRound
                    });
                    foreach (KeyValuePair <int, TianTi5v5ZhanDuiData> item2 in data.ZhanDuiDict)
                    {
                        TianTi5v5ZhanDuiData zhanduiData = item2.Value;
                        strLog += string.Format(" [ZhanDuiID:{0} JiFen:{1}]", item2.Key, zhanduiData.ZorkJiFen);
                    }
                    LogManager.WriteLog(LogTypes.Analysis, strLog, null, true);
                    return(result);
                }
            }
            catch (Exception ex)
            {
                result = -11;
                LogManager.WriteLog(LogTypes.Error, "Zork5v5Service.GameFuBenComplete_ZorkBattle failed!", ex, true);
            }
            return(result);
        }
Esempio n. 2
0
 public int GameFuBenComplete_ZorkBattle(ZorkBattleStatisticalData data)
 {
     return(Zork5v5Service.Instance().GameFuBenComplete_ZorkBattle(data));
 }