mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00: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))
|
if (!sRandomPlayerbotMgr->IsRandomBot(player))
|
||||||
return;
|
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)
|
if (sPlayerbotAIConfig->randomBotXPRate != 1.0)
|
||||||
{
|
{
|
||||||
amount = static_cast<uint32>(std::round(static_cast<float>(amount) * sPlayerbotAIConfig->randomBotXPRate));
|
amount = static_cast<uint32>(std::round(static_cast<float>(amount) * sPlayerbotAIConfig->randomBotXPRate));
|
||||||
|
|||||||
Reference in New Issue
Block a user