mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
Add config to disable hunters from generating specified pet families (#1485)
* Add config to disable hunters from generating specified pet families * Fixed unrelated typo in config
This commit is contained in:
@@ -895,6 +895,7 @@ void PlayerbotFactory::InitPet()
|
||||
std::vector<uint32> ids;
|
||||
|
||||
CreatureTemplateContainer const* creatures = sObjectMgr->GetCreatureTemplates();
|
||||
|
||||
for (CreatureTemplateContainer::const_iterator itr = creatures->begin(); itr != creatures->end(); ++itr)
|
||||
{
|
||||
if (!itr->second.IsTameable(bot->CanTameExoticPets()))
|
||||
@@ -910,6 +911,12 @@ void PlayerbotFactory::InitPet()
|
||||
if (onlyWolf && itr->second.family != CREATURE_FAMILY_WOLF)
|
||||
continue;
|
||||
|
||||
// Exclude configured pet families
|
||||
if (std::find(sPlayerbotAIConfig->excludedHunterPetFamilies.begin(),
|
||||
sPlayerbotAIConfig->excludedHunterPetFamilies.end(),
|
||||
itr->second.family) != sPlayerbotAIConfig->excludedHunterPetFamilies.end())
|
||||
continue;
|
||||
|
||||
ids.push_back(itr->first);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user