mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Merge pull request #320 from Chromie-WoW/configured65-mod-playerbots-pr-branch
SummonAction::Teleport Repairwhensummon changed to a .conf option
This commit is contained in:
@@ -127,10 +127,14 @@ AiPlayerbot.EquipmentPersistenceLevel = 80
|
||||
# default: 1 (accept based on level)
|
||||
AiPlayerbot.GroupInvitationPermission = 1
|
||||
|
||||
# Enable/Disable bot revive and repair gear when summon (0 = never, 1 = enable when non-combat and alive, 2 = enable always)
|
||||
# Enable/Disable bot revive when summon (0 = never, 1 = enable when non-combat and alive, 2 = enable always)
|
||||
# default: 1 (enable for non-combat)
|
||||
AiPlayerbot.BotReviveWhenSummon = 1
|
||||
|
||||
# Enable/Disable bot repair gear when summon (0 = no, 1 = yes)
|
||||
# default: 1
|
||||
AiPlayerbot.BotRepairWhenSummon = 1
|
||||
|
||||
# Non-GM player can only use init=auto to initialize bots based on their own level and gear score
|
||||
# default: 0 (non-gm player can use any intialization commands)
|
||||
AiPlayerbot.AutoInitOnly = 0
|
||||
|
||||
@@ -274,6 +274,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
equipmentPersistenceLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.EquipmentPersistenceLevel", 80);
|
||||
groupInvitationPermission = sConfigMgr->GetOption<int32>("AiPlayerbot.GroupInvitationPermission", 1);
|
||||
botReviveWhenSummon = sConfigMgr->GetOption<int>("AiPlayerbot.BotReviveWhenSummon", 1);
|
||||
botRepairWhenSummon = sConfigMgr->GetOption<bool>("AiPlayerbot.BotRepairWhenSummon", true);
|
||||
autoInitOnly = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoInitOnly", false);
|
||||
autoInitEquipLevelLimitRatio = sConfigMgr->GetOption<float>("AiPlayerbot.AutoInitEquipLevelLimitRatio", 1.0);
|
||||
addClassCommand = sConfigMgr->GetOption<int32>("AiPlayerbot.AddClassCommand", 1);
|
||||
|
||||
@@ -215,6 +215,7 @@ class PlayerbotAIConfig
|
||||
int32 equipmentPersistenceLevel;
|
||||
int32 groupInvitationPermission;
|
||||
int32 botReviveWhenSummon;
|
||||
bool botRepairWhenSummon;
|
||||
bool autoInitOnly;
|
||||
float autoInitEquipLevelLimitRatio;
|
||||
int32 addClassCommand;
|
||||
|
||||
@@ -176,6 +176,9 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
|
||||
|
||||
if (summoner->IsWithinLOS(x, y, z))
|
||||
{
|
||||
if (sPlayerbotAIConfig->botRepairWhenSummon) // .conf option to repair bot gear when summoned 0 = off, 1 = on
|
||||
bot->DurabilityRepairAll(false, 1.0f, false);
|
||||
|
||||
if (sPlayerbotAIConfig->botReviveWhenSummon < 2)
|
||||
{
|
||||
if (master->IsInCombat())
|
||||
@@ -200,7 +203,6 @@ bool SummonAction::Teleport(Player* summoner, Player* player)
|
||||
if (sPlayerbotAIConfig->botReviveWhenSummon > 0 && bot->isDead())
|
||||
{
|
||||
bot->ResurrectPlayer(1.0f, false);
|
||||
bot->DurabilityRepairAll(false, 1.0f, false);
|
||||
botAI->TellMasterNoFacing("I live, again!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user