(Hotfix) Fix summon transcendence (#129)

Manually setting summon transcendence was not working due to a change that passed in the canonical object instead of the grid object to `max_uncap_level`
This commit is contained in:
Justin Edmund 2023-08-26 15:38:54 -07:00 committed by GitHub
parent 8381c668bc
commit 39b353d9bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View file

@ -51,7 +51,7 @@ module Api
end
def admin_mode
if current_user && current_user.admin? && request.headers['X-Admin-Mode']
if current_user&.admin? && request.headers['X-Admin-Mode']
@admin_mode ||= request.headers['X-Admin-Mode'] == 'true'
end

View file

@ -114,12 +114,11 @@ module Api
private
def max_uncap_level(summon)
object = summon.summon
if object.flb && !object.ulb && !object.xlb
if summon.flb && !summon.ulb && !summon.xlb
4
elsif object.ulb && !object.xlb
elsif summon.ulb && !summon.xlb
5
elsif object.xlb
elsif summon.xlb
6
else
3