mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
modify bot revive when summon behaviour
This commit is contained in:
@@ -128,8 +128,8 @@ AiPlayerbot.EquipmentPersistenceLevel = 80
|
||||
# default: 1 (accept based on level)
|
||||
AiPlayerbot.GroupInvitationPermission = 1
|
||||
|
||||
# Enable/Disable bot revive and repair gear when summon
|
||||
# default: 1 (enable)
|
||||
# Enable/Disable bot revive and repair gear when summon (0 = never, 1 = enable when non-combat and alive, 2 = enable always)
|
||||
# default: 1 (enable for non-combat)
|
||||
AiPlayerbot.BotReviveWhenSummon = 1
|
||||
|
||||
# Non-GM player can only use init=auto to initialize bots based on their own level and gear score
|
||||
|
||||
@@ -313,7 +313,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
equipmentPersistence = sConfigMgr->GetOption<bool>("AiPlayerbot.EquipmentPersistence", false);
|
||||
equipmentPersistenceLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.EquipmentPersistenceLevel", 80);
|
||||
groupInvitationPermission = sConfigMgr->GetOption<int32>("AiPlayerbot.GroupInvitationPermission", 1);
|
||||
botReviveWhenSummon = sConfigMgr->GetOption<bool>("AiPlayerbot.BotReviveWhenSummon", true);
|
||||
botReviveWhenSummon = sConfigMgr->GetOption<int>("AiPlayerbot.BotReviveWhenSummon", 1);
|
||||
autoInitOnly = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoInitOnly", false);
|
||||
autoInitEquipLevelLimitRatio = sConfigMgr->GetOption<float>("AiPlayerbot.AutoInitEquipLevelLimitRatio", 1.0);
|
||||
addClassCommand = sConfigMgr->GetOption<int32>("AiPlayerbot.AddClassCommand", 1);
|
||||
|
||||
@@ -171,7 +171,7 @@ class PlayerbotAIConfig
|
||||
bool equipmentPersistence;
|
||||
int32 equipmentPersistenceLevel;
|
||||
int32 groupInvitationPermission;
|
||||
bool botReviveWhenSummon;
|
||||
int32 botReviveWhenSummon;
|
||||
bool autoInitOnly;
|
||||
float autoInitEquipLevelLimitRatio;
|
||||
int32 addClassCommand;
|
||||
|
||||
@@ -173,7 +173,8 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
|
||||
|
||||
if (summoner->IsWithinLOS(x, y, z))
|
||||
{
|
||||
if (sPlayerbotAIConfig->botReviveWhenSummon && bot->isDead())
|
||||
bool allowed = sPlayerbotAIConfig->botReviveWhenSummon == 2 || (sPlayerbotAIConfig->botReviveWhenSummon == 1 && !master->IsInCombat() && master->IsAlive());
|
||||
if (allowed && bot->isDead())
|
||||
{
|
||||
bot->ResurrectPlayer(1.0f, false);
|
||||
bot->DurabilityRepairAll(false, 1.0f, false);
|
||||
|
||||
Reference in New Issue
Block a user