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
|
||||
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 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 i = unoccupied_zone_ids.find_index(zone_id)
|
||||
unoccupied_zone_ids.delete zone_id
|
||||
else
|
||||
|
@ -49,16 +49,13 @@ class Roulette
|
|||
pass = false
|
||||
break
|
||||
end
|
||||
else
|
||||
pass = false
|
||||
end
|
||||
if pass
|
||||
found_item = true
|
||||
@item_ids << item.id
|
||||
break
|
||||
end
|
||||
end
|
||||
if pass
|
||||
found_item = true
|
||||
@item_ids << item.id
|
||||
break
|
||||
end
|
||||
end
|
||||
break if found_item
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue