protected void ReadParam() { if (!CheckGameServer()) { GameId = httpGet.GetInt("gametype"); ServerId = httpGet.GetInt("serverid"); ServerId = ServerId > 0 ? ServerId : 1; } ActionId = httpGet.GetInt("actionId"); }
/// <summary> /// /// </summary> /// <param name="typeName"></param> /// <param name="response"></param> /// <param name="userFactory"></param> /// <param name="httpGet"></param> public static void Request(string typeName, HttpGet httpGet, IGameResponse response, Func <int, BaseUser> userFactory) { int actionID = 0; string errorInfo = ""; try { bool isRL = BaseStruct.CheckRunloader(httpGet); if (isRL || httpGet.CheckSign()) { if (httpGet.GetInt("ActionID", ref actionID)) { BaseStruct action = FindRoute(typeName, httpGet, actionID); Process(action, httpGet, response, userFactory); if (action != null) { return; } } } else { errorInfo = "签名验证失败"; TraceLog.WriteError("Action request error:{2},rl:{0},param:{1}", isRL, httpGet.ParamString, errorInfo); } } catch (Exception ex) { TraceLog.WriteError("Action request error:{0}\r\nparam:{1}", ex, httpGet.ParamString); } RequestError(response, actionID, 10000, errorInfo); }