mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 02:20:00 +01:00
[Bot behaviour] accept invitation teleport distance check
This commit is contained in:
parent
01eb0e6434
commit
5318e4b49d
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user