From 031dd2c7befa3139a0ff9288597f9e4564c2719a Mon Sep 17 00:00:00 2001 From: Revision Date: Fri, 12 Jul 2024 13:48:46 +0200 Subject: [PATCH] Cleanup --- conf/playerbots.conf.dist | 6 +++--- src/PlayerbotAIConfig.cpp | 2 +- src/PlayerbotAIConfig.h | 2 +- src/strategy/actions/UseMeetingStoneAction.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 561bea76..348478b9 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -139,9 +139,9 @@ AiPlayerbot.AllowSummonWhenMasterIsDead = 1 # default: 1 (always) AiPlayerbot.AllowSummonWhenBotIsDead = 1 -# Enable/Disable bot revive when summon (0 = never, 1 = enable when non-combat, 2 = enable always) -# default: 1 (enable for non-combat) -AiPlayerbot.BotReviveWhenSummon = 1 +# Enable/Disable reviving the bots when summoning them +# default: 1 (enable) +AiPlayerbot.ReviveBotWhenSummoned = 1 # Enable/Disable bot repair gear when summon (0 = no, 1 = yes) # default: 1 diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 79531200..4d6a2a50 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -276,7 +276,7 @@ bool PlayerbotAIConfig::Initialize() allowSummonInCombat = sConfigMgr->GetOption("AiPlayerbot.AllowSummonInCombat", true); allowSummonWhenMasterIsDead = sConfigMgr->GetOption("AiPlayerbot.AllowSummonWhenMasterIsDead", true); allowSummonWhenBotIsDead = sConfigMgr->GetOption("AiPlayerbot.AllowSummonWhenBotIsDead", true); - botReviveWhenSummon = sConfigMgr->GetOption("AiPlayerbot.BotReviveWhenSummon", 1); + reviveBotWhenSummoned = sConfigMgr->GetOption("AiPlayerbot.ReviveBotWhenSummoned", true); botRepairWhenSummon = sConfigMgr->GetOption("AiPlayerbot.BotRepairWhenSummon", true); autoInitOnly = sConfigMgr->GetOption("AiPlayerbot.AutoInitOnly", false); autoInitEquipLevelLimitRatio = sConfigMgr->GetOption("AiPlayerbot.AutoInitEquipLevelLimitRatio", 1.0); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 3fb31410..d347b87e 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -217,7 +217,7 @@ class PlayerbotAIConfig bool allowSummonInCombat; bool allowSummonWhenMasterIsDead; bool allowSummonWhenBotIsDead; - int32 botReviveWhenSummon; + bool reviveBotWhenSummoned; bool botRepairWhenSummon; bool autoInitOnly; float autoInitEquipLevelLimitRatio; diff --git a/src/strategy/actions/UseMeetingStoneAction.cpp b/src/strategy/actions/UseMeetingStoneAction.cpp index f07ca217..f0267e0c 100644 --- a/src/strategy/actions/UseMeetingStoneAction.cpp +++ b/src/strategy/actions/UseMeetingStoneAction.cpp @@ -197,7 +197,7 @@ bool SummonAction::Teleport(Player* summoner, Player* player) return false; } - if (sPlayerbotAIConfig->botReviveWhenSummon == 2 || (sPlayerbotAIConfig->botReviveWhenSummon == 1 && !master->IsInCombat() && master->IsAlive())) + if (bot->isDead() && sPlayerbotAIConfig->reviveBotWhenSummoned) { bot->ResurrectPlayer(1.0f, false); botAI->TellMasterNoFacing("I live, again!");