summaryrefslogtreecommitdiff
path: root/app/controllers/game_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/game_controller.rb')
-rw-r--r--app/controllers/game_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb
index 1b88cb8..d3d3ce2 100644
--- a/app/controllers/game_controller.rb
+++ b/app/controllers/game_controller.rb
@@ -44,7 +44,8 @@ class GameController < ApplicationController
end
end
when "hearth_amenity"
- bhi = BuiltHearthAmenity.find_or_initialize_by(hearth_amenity: HearthAmenity.find_by_gid(result[:gid]))
+ bhi = current_char.hearth.built_hearth_amenities
+ .find_or_initialize_by(hearth_amenity: HearthAmenity.find_by_gid(result[:gid]))
bhi.update(level: result[:level])
@results.push({ type: type, hearth_amenity: bhi.hearth_amenity })
else