mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Merge pull request #326 from noisiver/cleanup-summon-options
Summon cleanup
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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!");
|
||||||
|
|||||||
Reference in New Issue
Block a user