public int GameFuBenChangeState(int gameId, GameFuBenState state, DateTime time) { int result = -11; TianTiFuBenData tianTiFuBenData = null; int result2; if (this.TianTiFuBenDataDict.TryGetValue(gameId, out tianTiFuBenData)) { this.AddRolePairFightCount(tianTiFuBenData); lock (tianTiFuBenData) { tianTiFuBenData.State = state; if (state == GameFuBenState.End) { this.RemoveGameFuBen(tianTiFuBenData); } } result2 = result; } else { result2 = -20; } return(result2); }
/// <summary> /// 游戏副本状态变更 /// </summary> /// <param name="gameId"></param> /// <param name="state"></param> /// <param name="time"></param> /// <returns></returns> public int GameFuBenChangeState(int gameId, GameFuBenState state, DateTime time) { int result = StdErrorCode.Error_Server_Busy; IYongZheZhanChangService kuaFuService = GetKuaFuService(); if (null != kuaFuService) { try { YongZheZhanChangFuBenData yongZheZhanChangFuBenData; lock (Mutex) { if (FuBenDataDict.TryGetValue(gameId, out yongZheZhanChangFuBenData)) { yongZheZhanChangFuBenData.State = state; } } result = kuaFuService.GameFuBenChangeState(gameId, state, time); } catch (System.Exception ex) { ResetKuaFuService(); result = StdErrorCode.Error_Server_Internal_Error; } } return(result); }
/// <summary> /// 游戏副本状态变更 /// </summary> /// <param name="gameId"></param> /// <param name="state"></param> /// <param name="time"></param> /// <returns></returns> public int GameFuBenChangeState(int gameId, GameFuBenState state, DateTime time) { int result = StdErrorCode.Error_Operation_Faild; IKuaFuService kuaFuService = null; TianTiFuBenData tianTiFuBenData = null; if (TianTiFuBenDataDict.TryGetValue(gameId, out tianTiFuBenData)) { AddRolePairFightCount(tianTiFuBenData); lock (tianTiFuBenData) { tianTiFuBenData.State = state; if (state == GameFuBenState.End) { RemoveGameFuBen(tianTiFuBenData); } } } else { return(StdErrorCode.Error_Not_Exist); } return(result); }
/// <summary> /// 游戏副本状态变更 /// </summary> /// <param name="gameId"></param> /// <param name="state"></param> /// <param name="time"></param> /// <returns></returns> public int GameFuBenChangeState(int gameId, GameFuBenState state, DateTime time) { int result = StdErrorCode.Error_Operation_Faild; IKuaFuService kuaFuService = null; HuanYingSiYuanFuBenData huanYingSiYuanFuBenData = null; if (HuanYingSiYuanFuBenDataDict.TryGetValue(gameId, out huanYingSiYuanFuBenData)) { lock (huanYingSiYuanFuBenData) { huanYingSiYuanFuBenData.State = state; if (state == GameFuBenState.End) { RemoveGameFuBen(huanYingSiYuanFuBenData, null); } } } else { return(StdErrorCode.Error_Not_Exist); } return(result); }
public int GameFuBenChangeState(int gameId, GameFuBenState state, DateTime time) { int result = -11000; IYongZheZhanChangService kuaFuService = this.GetKuaFuService(false); if (null != kuaFuService) { try { lock (this.Mutex) { YongZheZhanChangFuBenData yongZheZhanChangFuBenData; if (this.FuBenDataDict.TryGetValue(gameId, out yongZheZhanChangFuBenData)) { yongZheZhanChangFuBenData.State = state; } } result = kuaFuService.GameFuBenChangeState(gameId, state, time); } catch (Exception ex) { this.ResetKuaFuService(); result = -11003; } } return(result); }
public int GameFuBenChangeState(int gameId, GameFuBenState state, DateTime time) { int result = -11000; IKuaFuService kuaFuService = this.GetKuaFuService(false); if (null != kuaFuService) { try { result = kuaFuService.GameFuBenChangeState(gameId, state, time); } catch (Exception ex) { this.ResetKuaFuService(); result = -11003; } } return(result); }
/// <summary> /// 游戏副本状态变更 /// </summary> /// <param name="gameId"></param> /// <param name="state"></param> /// <param name="time"></param> /// <returns></returns> public int GameFuBenChangeState(int gameId, GameFuBenState state, DateTime time) { int result = StdErrorCode.Error_Server_Busy; ITianTiService kuaFuService = GetKuaFuService(); if (null != kuaFuService) { try { result = kuaFuService.GameFuBenChangeState(gameId, state, time); } catch (System.Exception ex) { ResetKuaFuService(); result = StdErrorCode.Error_Server_Internal_Error; } } return(result); }
public int GameFuBenChangeState(int gameId, GameFuBenState state, DateTime time) { int result = -11; HuanYingSiYuanFuBenData huanYingSiYuanFuBenData = null; int result2; if (this.HuanYingSiYuanFuBenDataDict.TryGetValue(gameId, out huanYingSiYuanFuBenData)) { lock (huanYingSiYuanFuBenData) { huanYingSiYuanFuBenData.State = state; if (state == GameFuBenState.End) { this.RemoveGameFuBen(huanYingSiYuanFuBenData); } } result2 = result; } else { result2 = -20; } return(result2); }