diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | app/models/monster_spawn_combat.rb | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index da85786..a46f657 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Aspirant title would not be awarded until gaining 101 TL due to a bug. +- Message received after leviathan death would say you earned the Sentinel title even if you already had it. ## [0.1.8.1] - 2021-06-06 diff --git a/app/models/monster_spawn_combat.rb b/app/models/monster_spawn_combat.rb index 08fe0f2..8dbd8e8 100644 --- a/app/models/monster_spawn_combat.rb +++ b/app/models/monster_spawn_combat.rb @@ -84,8 +84,9 @@ class MonsterSpawnCombat < ApplicationRecord character_damage[character] = MonsterSpawnCombat.where(monster_spawn: monster_spawn, character: character).sum(:hp_lost) end title_recipient = character_damage.max_by { |_, v| v }[0] - title_recipient.award_title("sentinel") - message_body_parts[title_recipient.id].push("You earned the Sentinel title!") + if title_recipient.award_title("sentinel") + message_body_parts[title_recipient.id].push("You earned the Sentinel title!") + end message_body_parts.each do |character_id, body_parts| if body_parts.any? |