mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
summon when group config
This commit is contained in:
@@ -78,6 +78,9 @@ AiPlayerbot.RandombotsWalkingRPG.InDoors = 0
|
||||
# Bots greet to the players
|
||||
AiPlayerbot.EnableGreet = 0
|
||||
|
||||
# Bots will be summoned to player when accept group invitation
|
||||
AiPlayerbot.SummonWhenGroup = 1
|
||||
|
||||
# Show helmet and cloak on randombots (reset required)
|
||||
AiPlayerbot.RandomBotShowHelmet = 1
|
||||
AiPlayerbot.RandomBotShowCloak = 1
|
||||
|
||||
@@ -310,6 +310,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
|
||||
// SPP switches
|
||||
enableGreet = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGreet", true);
|
||||
summonWhenGroup = sConfigMgr->GetOption<bool>("AiPlayerbot.SummonWhenGroup", true);
|
||||
disableRandomLevels = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableRandomLevels", false);
|
||||
randomBotRandomPassword = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotRandomPassword", true);
|
||||
downgradeMaxLevelBot = sConfigMgr->GetOption<bool>("AiPlayerbot.DowngradeMaxLevelBot", true);
|
||||
|
||||
@@ -142,6 +142,7 @@ class PlayerbotAIConfig
|
||||
bool perfMonEnabled;
|
||||
|
||||
bool enableGreet;
|
||||
bool summonWhenGroup;
|
||||
bool randomBotShowHelmet;
|
||||
bool randomBotShowCloak;
|
||||
bool disableRandomLevels;
|
||||
|
||||
@@ -41,5 +41,9 @@ bool AcceptInvitationAction::Execute(Event event)
|
||||
botAI->Reset();
|
||||
|
||||
botAI->TellMaster("Hello");
|
||||
|
||||
if (sPlayerbotAIConfig->summonWhenGroup) {
|
||||
Teleport(inviter, bot);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
#define _PLAYERBOT_ACCEPTINVITATIONACTION_H
|
||||
|
||||
#include "Action.h"
|
||||
#include "UseMeetingStoneAction.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class AcceptInvitationAction : public Action
|
||||
class AcceptInvitationAction : public SummonAction
|
||||
{
|
||||
public:
|
||||
AcceptInvitationAction(PlayerbotAI* botAI) : Action(botAI, "accept invitation") { }
|
||||
AcceptInvitationAction(PlayerbotAI* botAI) : SummonAction(botAI, "accept invitation") { }
|
||||
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user