public async Task <CompanyLvUpResult> CompanyLvUp(CompanyLvUpResult result) { var role = LogicServer.User.role; var bg = LogicServer.User.bag; var company = await CompanyDataHelper.Instance.GetCompanyByRoleIdAsync(role.Id); var department = await DepartmentGroupDataHelper.Instance.GetDepartMentGroupByRoleId(role.Id); var cmpConfig = CompanyInfo.GetForId(company.Level + 1); if (company == null || department == null) { result.Result = GameEnum.WsResult.NotFoundCompany; return(result); } if (CheckCompanyLvUp(company, department)) { result.Level = await CompanyLevelUp(role.Id, company, cmpConfig.CostGold, (int)Currency.Gold); return(result); } else { result.Result = GameEnum.WsResult.CompanyLvUpFailed; return(result); } }
private static async Task <BaseResponseData> CompanyLvUp() { CompanyLvUpResult result = new CompanyLvUpResult(); return(await CompanyController.Instance.CompanyLvUp(result)); }