diff options
author | David Gay <david@davidgay.org> | 2021-06-16 21:13:04 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-16 21:13:04 -0400 |
commit | 163c947e3e353f8accda9ba017c3130b2004e86d (patch) | |
tree | ca3270eeafa8a77b3135120b4008e6f380fe5e7f | |
parent | 6dfaa7453591910e1373d92d8a09ddf384ebe834 (diff) |
Fix bug with activity completion caused by no-effect equipment
-rw-r--r-- | CHANGELOG.md | 6 | ||||
-rw-r--r-- | app/models/character.rb | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ea26fc..36d2425 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.1.11.1] - 2021-06-16 + +### Fixed +- Bug where having an item equipped which has no game data effects (such as trophies, the effects of which are + hardcoded) would cause activities to fail to complete. + ## [0.1.11] - 2021-06-16 ### General diff --git a/app/models/character.rb b/app/models/character.rb index b7649c3..6cf1dbb 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -122,7 +122,7 @@ class Character < ApplicationRecord broken_items = [] # TODO: HACK: Should check other stats besides speed stat in the future. # TODO: HACK: May not want a chance to break if speed is _reduced_. Though no equipment does this yet. - equipment.all.select { |eq| eq.effects.select { |ef| ef[:gid] == "#{skill.gid}_speed" }.any? }.each do |equipment| + equipment.all.select { |eq| eq.effects&.select { |ef| ef[:gid] == "#{skill.gid}_speed" }.any? }.each do |equipment| if equipment.break_check broken_items.push(equipment.item) end |