1
0
Fork 0
forked from OpenNeo/impress

species check was in the wrong place. fixed

This commit is contained in:
Emi Matchu 2011-01-27 17:50:08 -05:00
parent 8a36155994
commit b1015c9a5c

View file

@ -37,11 +37,11 @@ class Roulette
used_swf_asset_ids.push(swf_asset.id) used_swf_asset_ids.push(swf_asset.id)
swf_asset.object_asset_relationships.each do |rel| swf_asset.object_asset_relationships.each do |rel|
item = rel.item item = rel.item
if item.species_support_ids.empty? || item.species_support_ids.include?(@pet_type.species_id)
pass = true pass = true
item.affected_zones.each do |zone| item.affected_zones.each do |zone|
checked_zone_id = zone.id checked_zone_id = zone.id
next if 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) if i = unoccupied_zone_ids.find_index(zone_id)
unoccupied_zone_ids.delete zone_id unoccupied_zone_ids.delete zone_id
else else
@ -49,10 +49,6 @@ class Roulette
pass = false pass = false
break break
end end
else
pass = false
break
end
end end
if pass if pass
found_item = true found_item = true
@ -60,6 +56,7 @@ class Roulette
break break
end end
end end
end
break if found_item break if found_item
end end
end end