public bool SpecialKfFuben(GameTypes gameType, long gameId, int roleNum, out int kfSrvId) { kfSrvId = 0; ClientAgent assignAgent = null; int serverId = KuaFuServerManager.GetSpecialLineId(gameType); bool result; if (serverId <= 0) { kfSrvId = -3; result = false; } else { lock (this.Mutex) { ClientAgent agent = null; if (this.ServerId2ClientAgent.TryGetValue(serverId, out agent) && agent.IsAlive) { assignAgent = agent; } else { kfSrvId = -100; } if (assignAgent != null) { assignAgent.AssginKfFuben(gameType, gameId, roleNum); kfSrvId = assignAgent.ClientInfo.ServerId; return(true); } } result = false; } return(result); }