[Feature] Add "Keeps Sold Items" Flag to NPCs (#2671)

# Perl
- Add `$npc->GetKeepsSoldItems()`.
- Add `$npc->SetKeepsSoldItems(keeps_sold_items)`.

# Lua
- Add `npc:GetKeepsSoldItems()`.
- Add `npc:SetKeepsSoldItems(keeps_sold_items)`.

# Notes
- Allows operators to keep specific NPCs from keeping items sold to them.
- Keeps NPCs from being cluttered with stuff like Cloth Caps, Bone Chips, etc.
This commit is contained in:
Alex King
2022-12-25 16:36:20 -05:00
committed by GitHub
parent 2ed73199bf
commit a590ea1d52
19 changed files with 696 additions and 415 deletions
+1
View File
@@ -2134,6 +2134,7 @@ const NPCType *ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
t->hp_regen_per_second = n.hp_regen_per_second;
t->heroic_strikethrough = n.heroic_strikethrough;
t->faction_amount = n.faction_amount;
t->keeps_sold_items = n.keeps_sold_items;
// If NPC with duplicate NPC id already in table,
// free item we attempted to add.