rubocop autofix
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class WowPetDetailWorker < WowSidekiqWorker
|
||||
def locales
|
||||
super
|
||||
end
|
||||
|
||||
def perform(pet_id)
|
||||
|
||||
return unless (pet = WowPet.where(pet_id: pet_id).first)
|
||||
|
||||
RBattlenet.set_options(locale: 'all')
|
||||
@@ -39,12 +36,10 @@ class WowPetDetailWorker < WowSidekiqWorker
|
||||
creature_media = RBattlenet::Wow::CreatureMedia.find(pet.creature_display_id)
|
||||
pet.media_zoom_url = creature_media.assets.first.value if creature_media.status_code == 200
|
||||
|
||||
if result.abilities
|
||||
result.abilities.each do |ability|
|
||||
next unless (local_ability = WowPetAbility.where(ability_id: ability.ability.id).first)
|
||||
result.abilities&.each do |ability|
|
||||
next unless (local_ability = WowPetAbility.where(ability_id: ability.ability.id).first)
|
||||
|
||||
LearnedWowPetAbility.where(wow_pet: pet.id, wow_pet_ability: local_ability.id).first_or_create
|
||||
end
|
||||
LearnedWowPetAbility.where(wow_pet: pet.id, wow_pet_ability: local_ability.id).first_or_create
|
||||
end
|
||||
|
||||
pet.save
|
||||
|
||||
Reference in New Issue
Block a user