mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
@@ -1808,6 +1808,14 @@ AiPlayerbot.AllowedLogFiles = ""
|
||||
#
|
||||
####################################################################################################
|
||||
|
||||
####################################################################################################
|
||||
# A list of gameObject GUID's that are not allowed for bots to interact with.
|
||||
# Example: 176213 = Blood of Heroes
|
||||
# Example: 17155 = Defias Gunpowder
|
||||
AiPlayerbot.DisallowedGameObjects = 176213,17155
|
||||
#
|
||||
####################################################################################################
|
||||
|
||||
##############################################
|
||||
# Deprecated Settings (yet still in use) #
|
||||
##############################################
|
||||
|
||||
@@ -156,7 +156,9 @@ bool PlayerbotAIConfig::Initialize()
|
||||
LoadList<std::vector<uint32>>(
|
||||
sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotQuestIds", "7848,3802,5505,6502,7761"),
|
||||
randomBotQuestIds);
|
||||
|
||||
|
||||
LoadSet<std::set<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.DisallowedGameObjects", "176213,17155"),
|
||||
disallowedGameObjects);
|
||||
botAutologin = sConfigMgr->GetOption<bool>("AiPlayerbot.BotAutologin", false);
|
||||
randomBotAutologin = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotAutologin", true);
|
||||
minRandomBots = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBots", 50);
|
||||
|
||||
@@ -72,6 +72,7 @@ public:
|
||||
float maxAoeAvoidRadius;
|
||||
std::set<uint32> aoeAvoidSpellWhitelist;
|
||||
bool tellWhenAvoidAoe;
|
||||
std::set<uint32> disallowedGameObjects;
|
||||
|
||||
uint32 openGoSpell;
|
||||
bool randomBotAutologin;
|
||||
|
||||
@@ -35,8 +35,17 @@ bool LootAction::Execute(Event /*event*/)
|
||||
// bot->GetSession()->HandleLootReleaseOpcode(packet);
|
||||
}
|
||||
|
||||
context->GetValue<LootObject>("loot target")->Set(lootObject);
|
||||
return true;
|
||||
// Provide a system to check if the game object id is disallowed in the user configurable list or not.
|
||||
// Check if the game object id is disallowed in the user configurable list or not.
|
||||
if (sPlayerbotAIConfig->disallowedGameObjects.find(lootObject.guid.GetEntry()) != sPlayerbotAIConfig->disallowedGameObjects.end())
|
||||
{
|
||||
return false; // Game object ID is disallowed, so do not proceed
|
||||
}
|
||||
else
|
||||
{
|
||||
context->GetValue<LootObject>("loot target")->Set(lootObject);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool LootAction::isUseful()
|
||||
@@ -147,7 +156,7 @@ bool OpenLootAction::DoLoot(LootObject& lootObject)
|
||||
uint32 spellId = GetOpeningSpell(lootObject);
|
||||
if (!spellId)
|
||||
return false;
|
||||
|
||||
|
||||
return botAI->CastSpell(spellId, bot);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user