mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
summon when group config
This commit is contained in:
parent
cf4f2d7309
commit
ced051b16c
@ -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
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user