mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
dont apply XPRate if bot is in group with real player
https://github.com/liyunfan1223/mod-playerbots/issues/1490
This commit is contained in:
@@ -215,6 +215,20 @@ public:
|
||||
if (!sRandomPlayerbotMgr->IsRandomBot(player))
|
||||
return;
|
||||
|
||||
// if player in group check leader is real player.
|
||||
if (Group* group = player->GetGroup())
|
||||
{
|
||||
Player* leader = group->GetLeader();
|
||||
if (leader != player)
|
||||
{
|
||||
if (!player->GetSession()->IsBot())
|
||||
return;
|
||||
|
||||
if (!sRandomPlayerbotMgr->IsRandomBot(player))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (sPlayerbotAIConfig->randomBotXPRate != 1.0)
|
||||
{
|
||||
amount = static_cast<uint32>(std::round(static_cast<float>(amount) * sPlayerbotAIConfig->randomBotXPRate));
|
||||
|
||||
Reference in New Issue
Block a user