Added unobtainable items to config (#2133)

# Pull Request

Moving hardcoded values to config

## How to Test the Changes

- use maintenance command
- unequip and destroy item get from this command
- turn off server
- add item to config
- turn on server
- use maintenace command
- check that different item was provided

## Complexity & Impact

Does this change add new decision branches?
- - [X] No
- - [ ] Yes (**explain below**)

Does this change increase per-bot or per-tick processing?
- - [X] No
- - [ ] Yes (**describe and justify impact**)

Could this logic scale poorly under load?
- - [X] No
- - [ ] Yes (**explain why**)
---

## Defaults & Configuration

Does this change modify default bot behavior?
- - [X] No
- - [ ] Yes (**explain why**)
---

## AI Assistance

Was AI assistance (e.g. ChatGPT or similar tools) used while working on
this change?
- - [X] No
- - [ ] Yes (**explain below**)

---

## Final Checklist

- - [X] Stability is not compromised
- - [X] Performance impact is understood, tested, and acceptable
- - [X] Added logic complexity is justified and explained
- - [X] Documentation updated if needed

---

## Notes for Reviewers
This commit is contained in:
kadeshar
2026-03-06 16:56:53 +01:00
committed by GitHub
parent d32b10de15
commit 28a888b6e0
4 changed files with 12 additions and 5 deletions

View File

@@ -796,6 +796,10 @@ AiPlayerbot.LimitGearExpansion = 1
# Set between 0 (0%) and 1 (100%)
AiPlayerbot.RandomGearLoweringChance = 0
# Unobtainable or unusable items (comma-separated list of item IDs)
# Default: Chilton Wand (12468), Totem of the Earthen Ring (46978)
AiPlayerbot.UnobtainableItems = 12468,46978
# Randombots check player's gearscore level and deny the group invitation if it's too low
# Default: 0 (disabled)
AiPlayerbot.GearScoreCheck = 0
@@ -2213,4 +2217,4 @@ AiPlayerbot.SummonAtInnkeepersEnabled = 1
# 30% more damage, 40% damage reduction (tank bots), increased all resistances, reduced threat for non tank bots, increased threat for tank bots.
# Buffs will be applied on PP, Sindragosa and Lich King
AiPlayerbot.EnableICCBuffs = 1
AiPlayerbot.EnableICCBuffs = 1

View File

@@ -2255,10 +2255,7 @@ void RandomItemMgr::BuildEquipCacheNew()
continue;
}
// Unobtainable or unusable items
if (itemId == 12468 || // Chilton Wand
itemId == 22784 || // Sunwell Orb
itemId == 46978) // Totem of the Earthen Ring
if (sPlayerbotAIConfig.unobtainableItems.find(itemId) != sPlayerbotAIConfig.unobtainableItems.end())
continue;
equipCacheNew[proto->RequiredLevel][proto->InventoryType].push_back(itemId);

View File

@@ -182,6 +182,11 @@ bool PlayerbotAIConfig::Initialize()
LoadSet<std::set<uint32>>(
sConfigMgr->GetOption<std::string>("AiPlayerbot.AttunementQuests", "10279,10277,10282,10283,10284,10285,10296,10297,10298,11481,11482,11488,11490,11492,10901"),
attunementQuests);
LoadSet<std::set<uint32>>(
sConfigMgr->GetOption<std::string>("AiPlayerbot.UnobtainableItems", "12468,46978"),
unobtainableItems);
botAutologin = sConfigMgr->GetOption<bool>("AiPlayerbot.BotAutologin", false);
randomBotAutologin = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotAutologin", true);
minRandomBots = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBots", 500);

View File

@@ -99,6 +99,7 @@ public:
bool tellWhenAvoidAoe;
std::set<uint32> disallowedGameObjects;
std::set<uint32> attunementQuests;
std::set<uint32> unobtainableItems;
uint32 openGoSpell;
bool randomBotAutologin;