diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/character.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/character.rb b/app/models/character.rb index fda6868..f0705f9 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -82,6 +82,11 @@ class Character < ApplicationRecord item.equip_slots.reject { |slot| full_slots.include?(slot) } end + def trophy_monster_gid + equipment = self.equipment.joins(:item).where("items.gid like ?", "%_trophy").first + equipment.item.gid.split("_trophy").first + end + def equip(item) Character.transaction do open_slots = self.open_slots_for(item) |