diff options
author | David Gay <david@davidgay.org> | 2021-06-06 12:36:43 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-06 12:36:43 -0400 |
commit | bce9b7729ec148d0b728602309fea6787802468b (patch) | |
tree | 0ccc60d2b4159682b33aea32b3b622024004c6a4 /app/lib | |
parent | 55f9287eb75530f19b792685e31470dd66b1eec1 (diff) |
Fix bug when awarding XP from things like opening rusted lockbox
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/activity_processor.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/lib/activity_processor.rb b/app/lib/activity_processor.rb index 6d2cd90..73f296d 100644 --- a/app/lib/activity_processor.rb +++ b/app/lib/activity_processor.rb @@ -37,6 +37,7 @@ class ActivityProcessor type = result[:type] case type when "xp" + puts "Result: #{result}" handle_xp_result(result) when "monster" raise TooManyWoundsError unless @character.can_fight? @@ -155,7 +156,7 @@ class ActivityProcessor end def handle_xp_result(data) - skill = Skill.find_by_gid(data[:skill]) + skill = Skill.find_by_gid(data[:gid]) amount = data[:base] @character.add_skill_xp(skill, amount) @results.push({ type: "xp", skill: skill, xp: amount }) |