Convert PlayerbotsXPRate to RandomBotXPRate (#1313)

This commit is contained in:
Yunfan Li
2025-05-19 01:34:17 +08:00
committed by GitHub
parent e1a8bd66c5
commit c5b185455c
5 changed files with 14 additions and 12 deletions

View File

@@ -219,9 +219,12 @@ public:
if (!player->GetSession()->IsBot())
return;
if (sPlayerbotAIConfig->playerbotsXPrate != 1.0)
if (!sRandomPlayerbotMgr->IsRandomBot(player))
return;
if (sPlayerbotAIConfig->randomBotXPRate != 1.0)
{
amount = static_cast<uint32>(std::round(static_cast<float>(amount) * sPlayerbotAIConfig->playerbotsXPrate));
amount = static_cast<uint32>(std::round(static_cast<float>(amount) * sPlayerbotAIConfig->randomBotXPRate));
}
}
};