Skip to content

Commit

Permalink
fix: adjust bestiary logic to add kill monster only
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Sep 15, 2023
1 parent 839f5b9 commit 5bd4017
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 0 additions & 3 deletions src/creatures/players/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1654,9 +1654,6 @@ void Player::onCreatureAppear(Creature* creature, bool isLogin) {
}
}

// Reload bestiary tracker
refreshCyclopediaMonsterTracker();

g_game().checkPlayersRecord();
IOLoginData::updateOnlineStatus(guid, true);
if (getLevel() < g_configManager().getNumber(ADVENTURERSBLESSING_LEVEL)) {
Expand Down
8 changes: 2 additions & 6 deletions src/io/iobestiary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,8 @@ void IOBestiary::addBestiaryKill(Player* player, const std::shared_ptr<MonsterTy
}
}

const auto &trackerUnorderedSet = player->getCyclopediaMonsterTrackerSet(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<MonsterType> mtype) {
Expand Down

0 comments on commit 5bd4017

Please sign in to comment.