public bool onSessionCmd(ISession s, object sCtx, string cls, string method, object par) { AEPlayer p = null; if (!_players.TryGetValue(s.sessionID, out p)) { s.lastErrorCode = AEErrorCode.ERR_SESSOIN_PLAYER_NOT_EXIST; s.lastErrorMsg = "game [" + this.name + "] onSessionCmd sid [" + s.sessionID + "] player not exist!"; Debug.logger.log(LogType.LOG_ERR, s.lastErrorMsg); return(false); } IGameModule m = getGameModule(cls); if (m == null) { if (this.name == "SHOutGame" && cls == "webGame") { s.lastErrorCode = AEErrorCode.ERR_SESSION_NEED_LOGIN; s.lastErrorMsg = "need login!"; } else { s.lastErrorCode = AEErrorCode.ERR_SYS_SERVER_INTERNAL_ERROR; s.lastErrorMsg = "game [" + this.name + "] onSessionCmd sid [" + s.sessionID + "] game module[" + cls + "] not exist!"; } if (method != "refreshUser" && method != "logout") { Debug.logger.log(LogType.LOG_ERR, s.lastErrorMsg); } return(false); } return(m.onPlayerCmd(p, sCtx, method, par)); }