species check was in the wrong place. fixed
This commit is contained in:
parent
8a36155994
commit
b1015c9a5c
1 changed files with 9 additions and 12 deletions
|
@ -37,11 +37,11 @@ class Roulette
|
|||
used_swf_asset_ids.push(swf_asset.id)
|
||||
swf_asset.object_asset_relationships.each do |rel|
|
||||
item = rel.item
|
||||
if item.species_support_ids.empty? || item.species_support_ids.include?(@pet_type.species_id)
|
||||
pass = true
|
||||
item.affected_zones.each do |zone|
|
||||
checked_zone_id = zone.id
|
||||
next if checked_zone_id == zone_id
|
||||
if item.species_support_ids.empty? || item.species_support_ids.include?(@pet_type.species_id)
|
||||
if i = unoccupied_zone_ids.find_index(zone_id)
|
||||
unoccupied_zone_ids.delete zone_id
|
||||
else
|
||||
|
@ -49,10 +49,6 @@ class Roulette
|
|||
pass = false
|
||||
break
|
||||
end
|
||||
else
|
||||
pass = false
|
||||
break
|
||||
end
|
||||
end
|
||||
if pass
|
||||
found_item = true
|
||||
|
@ -60,6 +56,7 @@ class Roulette
|
|||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
break if found_item
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue