Disable achievements for random bots

This commit is contained in:
郑佩茹
2022-09-27 14:21:41 -06:00
parent f362da1c0a
commit d33a28954f

View File

@@ -178,6 +178,24 @@ class PlayerbotsPlayerScript : public PlayerScript
sRandomPlayerbotMgr->HandleCommand(type, msg, player);
}
bool OnBeforeCriteriaProgress(Player* player, AchievementCriteriaEntry const* /*criteria*/) override
{
if (sRandomPlayerbotMgr->IsRandomBot(player))
{
return false;
}
return true;
}
bool OnBeforeAchiComplete(Player* player, AchievementEntry const* /*achievement*/) override
{
if (sRandomPlayerbotMgr->IsRandomBot(player))
{
return false;
}
return true;
}
};
class PlayerbotsMiscScript : public MiscScript