Changed OnPlayerBeforeAchievementComplete to allow random bots to unlock achievements (#1487)

This commit is contained in:
Revision
2025-08-01 21:48:01 +02:00
committed by GitHub
parent ba9cb5a256
commit ede7697784

View File

@@ -197,21 +197,13 @@ public:
sRandomPlayerbotMgr->HandleCommand(type, msg, player);
}
bool OnPlayerBeforeCriteriaProgress(Player* player, AchievementCriteriaEntry const* /*criteria*/) override
bool OnPlayerBeforeAchievementComplete(Player* player, AchievementEntry const* achievement) override
{
if (sRandomPlayerbotMgr->IsRandomBot(player))
if (sRandomPlayerbotMgr->IsRandomBot(player) && (achievement->flags == 256 || achievement->flags == 768))
{
return false;
}
return true;
}
bool OnPlayerBeforeAchievementComplete(Player* player, AchievementEntry const* /*achievement*/) override
{
if (sRandomPlayerbotMgr->IsRandomBot(player))
{
return false;
}
return true;
}