This commit is contained in:
Revision
2024-07-12 13:48:46 +02:00
parent b60a4a3531
commit 031dd2c7be
4 changed files with 6 additions and 6 deletions

View File

@@ -139,9 +139,9 @@ AiPlayerbot.AllowSummonWhenMasterIsDead = 1
# default: 1 (always) # default: 1 (always)
AiPlayerbot.AllowSummonWhenBotIsDead = 1 AiPlayerbot.AllowSummonWhenBotIsDead = 1
# Enable/Disable bot revive when summon (0 = never, 1 = enable when non-combat, 2 = enable always) # Enable/Disable reviving the bots when summoning them
# default: 1 (enable for non-combat) # default: 1 (enable)
AiPlayerbot.BotReviveWhenSummon = 1 AiPlayerbot.ReviveBotWhenSummoned = 1
# Enable/Disable bot repair gear when summon (0 = no, 1 = yes) # Enable/Disable bot repair gear when summon (0 = no, 1 = yes)
# default: 1 # default: 1

View File

@@ -276,7 +276,7 @@ bool PlayerbotAIConfig::Initialize()
allowSummonInCombat = sConfigMgr->GetOption<bool>("AiPlayerbot.AllowSummonInCombat", true); allowSummonInCombat = sConfigMgr->GetOption<bool>("AiPlayerbot.AllowSummonInCombat", true);
allowSummonWhenMasterIsDead = sConfigMgr->GetOption<bool>("AiPlayerbot.AllowSummonWhenMasterIsDead", true); allowSummonWhenMasterIsDead = sConfigMgr->GetOption<bool>("AiPlayerbot.AllowSummonWhenMasterIsDead", true);
allowSummonWhenBotIsDead = sConfigMgr->GetOption<bool>("AiPlayerbot.AllowSummonWhenBotIsDead", true); allowSummonWhenBotIsDead = sConfigMgr->GetOption<bool>("AiPlayerbot.AllowSummonWhenBotIsDead", true);
botReviveWhenSummon = sConfigMgr->GetOption<int>("AiPlayerbot.BotReviveWhenSummon", 1); reviveBotWhenSummoned = sConfigMgr->GetOption<bool>("AiPlayerbot.ReviveBotWhenSummoned", true);
botRepairWhenSummon = sConfigMgr->GetOption<bool>("AiPlayerbot.BotRepairWhenSummon", true); botRepairWhenSummon = sConfigMgr->GetOption<bool>("AiPlayerbot.BotRepairWhenSummon", true);
autoInitOnly = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoInitOnly", false); autoInitOnly = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoInitOnly", false);
autoInitEquipLevelLimitRatio = sConfigMgr->GetOption<float>("AiPlayerbot.AutoInitEquipLevelLimitRatio", 1.0); autoInitEquipLevelLimitRatio = sConfigMgr->GetOption<float>("AiPlayerbot.AutoInitEquipLevelLimitRatio", 1.0);

View File

@@ -217,7 +217,7 @@ class PlayerbotAIConfig
bool allowSummonInCombat; bool allowSummonInCombat;
bool allowSummonWhenMasterIsDead; bool allowSummonWhenMasterIsDead;
bool allowSummonWhenBotIsDead; bool allowSummonWhenBotIsDead;
int32 botReviveWhenSummon; bool reviveBotWhenSummoned;
bool botRepairWhenSummon; bool botRepairWhenSummon;
bool autoInitOnly; bool autoInitOnly;
float autoInitEquipLevelLimitRatio; float autoInitEquipLevelLimitRatio;

View File

@@ -197,7 +197,7 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
return false; return false;
} }
if (sPlayerbotAIConfig->botReviveWhenSummon == 2 || (sPlayerbotAIConfig->botReviveWhenSummon == 1 && !master->IsInCombat() && master->IsAlive())) if (bot->isDead() && sPlayerbotAIConfig->reviveBotWhenSummoned)
{ {
bot->ResurrectPlayer(1.0f, false); bot->ResurrectPlayer(1.0f, false);
botAI->TellMasterNoFacing("I live, again!"); botAI->TellMasterNoFacing("I live, again!");