diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index b018a9d5e25..9d9a5e9c54d 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -1654,9 +1654,6 @@ void Player::onCreatureAppear(Creature* creature, bool isLogin) { } } - // Reload bestiary tracker - refreshBestiaryMonsterTracker(); - g_game().checkPlayersRecord(); IOLoginData::updateOnlineStatus(guid, true); if (getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL)) { diff --git a/src/creatures/players/player.hpp b/src/creatures/players/player.hpp index 34bda548582..5f159f0ec37 100644 --- a/src/creatures/players/player.hpp +++ b/src/creatures/players/player.hpp @@ -303,8 +303,8 @@ class Player final : public Creature, public Cylinder, public Bankable { } } - void refreshBestiaryMonsterTracker() const { - refreshCyclopediaMonsterTracker(getCyclopediaMonsterTrackerSet(false), false); + void refreshCyclopediaMonsterTracker(bool isBoss = false) const { + refreshCyclopediaMonsterTracker(getCyclopediaMonsterTrackerSet(isBoss), isBoss); } void refreshCyclopediaMonsterTracker(const phmap::parallel_flat_hash_set> &trackerList, bool isBoss) const { diff --git a/src/io/io_bosstiary.cpp b/src/io/io_bosstiary.cpp index 45a650765c1..afe6c647245 100644 --- a/src/io/io_bosstiary.cpp +++ b/src/io/io_bosstiary.cpp @@ -176,6 +176,7 @@ void IOBosstiary::addBosstiaryKill(Player* player, const std::shared_ptraddBestiaryKillCount(bossId, amount); + player->refreshCyclopediaMonsterTracker(true); auto newBossLevel = getBossCurrentLevel(player, bossId); if (oldBossLevel == newBossLevel) { return; diff --git a/src/io/iobestiary.cpp b/src/io/iobestiary.cpp index 2cb73b40e7e..acfeb561ae6 100644 --- a/src/io/iobestiary.cpp +++ b/src/io/iobestiary.cpp @@ -237,12 +237,8 @@ void IOBestiary::addBestiaryKill(Player* player, const std::shared_ptrgetCyclopediaMonsterTrackerSet(false); - for (const auto mType : trackerUnorderedSet) { - if (raceid == mType->info.raceid) { - player->refreshCyclopediaMonsterTracker(trackerUnorderedSet, false); - } - } + // Reload bestiary tracker + player->refreshCyclopediaMonsterTracker(); } charmRune_t IOBestiary::getCharmFromTarget(Player* player, const std::shared_ptr mtype) {