summon when group config

This commit is contained in:
Yunfan Li 2023-12-17 23:04:05 +08:00
parent cf4f2d7309
commit ced051b16c
5 changed files with 12 additions and 2 deletions

View File

@ -78,6 +78,9 @@ AiPlayerbot.RandombotsWalkingRPG.InDoors = 0
# Bots greet to the players # Bots greet to the players
AiPlayerbot.EnableGreet = 0 AiPlayerbot.EnableGreet = 0
# Bots will be summoned to player when accept group invitation
AiPlayerbot.SummonWhenGroup = 1
# Show helmet and cloak on randombots (reset required) # Show helmet and cloak on randombots (reset required)
AiPlayerbot.RandomBotShowHelmet = 1 AiPlayerbot.RandomBotShowHelmet = 1
AiPlayerbot.RandomBotShowCloak = 1 AiPlayerbot.RandomBotShowCloak = 1

View File

@ -310,6 +310,7 @@ bool PlayerbotAIConfig::Initialize()
// SPP switches // SPP switches
enableGreet = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGreet", true); enableGreet = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGreet", true);
summonWhenGroup = sConfigMgr->GetOption<bool>("AiPlayerbot.SummonWhenGroup", true);
disableRandomLevels = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableRandomLevels", false); disableRandomLevels = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableRandomLevels", false);
randomBotRandomPassword = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotRandomPassword", true); randomBotRandomPassword = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotRandomPassword", true);
downgradeMaxLevelBot = sConfigMgr->GetOption<bool>("AiPlayerbot.DowngradeMaxLevelBot", true); downgradeMaxLevelBot = sConfigMgr->GetOption<bool>("AiPlayerbot.DowngradeMaxLevelBot", true);

View File

@ -142,6 +142,7 @@ class PlayerbotAIConfig
bool perfMonEnabled; bool perfMonEnabled;
bool enableGreet; bool enableGreet;
bool summonWhenGroup;
bool randomBotShowHelmet; bool randomBotShowHelmet;
bool randomBotShowCloak; bool randomBotShowCloak;
bool disableRandomLevels; bool disableRandomLevels;

View File

@ -41,5 +41,9 @@ bool AcceptInvitationAction::Execute(Event event)
botAI->Reset(); botAI->Reset();
botAI->TellMaster("Hello"); botAI->TellMaster("Hello");
if (sPlayerbotAIConfig->summonWhenGroup) {
Teleport(inviter, bot);
}
return true; return true;
} }

View File

@ -6,13 +6,14 @@
#define _PLAYERBOT_ACCEPTINVITATIONACTION_H #define _PLAYERBOT_ACCEPTINVITATIONACTION_H
#include "Action.h" #include "Action.h"
#include "UseMeetingStoneAction.h"
class PlayerbotAI; class PlayerbotAI;
class AcceptInvitationAction : public Action class AcceptInvitationAction : public SummonAction
{ {
public: public:
AcceptInvitationAction(PlayerbotAI* botAI) : Action(botAI, "accept invitation") { } AcceptInvitationAction(PlayerbotAI* botAI) : SummonAction(botAI, "accept invitation") { }
bool Execute(Event event) override; bool Execute(Event event) override;
}; };