mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Bot behaviour] accept invitation teleport distance check
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include "AcceptInvitationAction.h"
|
#include "AcceptInvitationAction.h"
|
||||||
#include "Event.h"
|
#include "Event.h"
|
||||||
|
#include "PlayerbotAIConfig.h"
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
#include "PlayerbotSecurity.h"
|
#include "PlayerbotSecurity.h"
|
||||||
|
|
||||||
@@ -42,7 +43,7 @@ bool AcceptInvitationAction::Execute(Event event)
|
|||||||
|
|
||||||
botAI->TellMaster("Hello");
|
botAI->TellMaster("Hello");
|
||||||
|
|
||||||
if (sPlayerbotAIConfig->summonWhenGroup) {
|
if (sPlayerbotAIConfig->summonWhenGroup && bot->GetDistance(inviter) > sPlayerbotAIConfig->sightDistance) {
|
||||||
Teleport(inviter, bot);
|
Teleport(inviter, bot);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user