mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 02:10:28 +00:00
removeFromGroup replaced with worldpackets
This commit is contained in:
@@ -70,10 +70,12 @@ bool UninviteAction::Execute(Event event)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LeaveGroupAction::Leave(Player* player)
|
||||
static bool LeaveGroupAction::Leave(Player* player)
|
||||
{
|
||||
if (player && !GET_PLAYERBOT_AI(player) &&
|
||||
if (player &&
|
||||
!botAI &&
|
||||
!botAI->GetSecurity()->CheckLevelFor(PLAYERBOT_SECURITY_INVITE, false, player))
|
||||
|
||||
return false;
|
||||
|
||||
bool aiMaster = GET_PLAYERBOT_AI(botAI->GetMaster()) != nullptr;
|
||||
@@ -84,7 +86,7 @@ bool LeaveGroupAction::Leave(Player* player)
|
||||
bool shouldStay = randomBot && bot->GetGroup() && player == bot;
|
||||
if (!shouldStay)
|
||||
{
|
||||
bot->RemoveFromGroup();
|
||||
botAI->RemoveFromGroup();
|
||||
}
|
||||
|
||||
if (randomBot)
|
||||
|
||||
Reference in New Issue
Block a user