feat(editor): add Trainer/Banker/Auctioneer/Repair NPC flags + SQL export

CreatureSpawn struct gains four AzerothCore-standard NPC flag bits:
  trainer    -> npcflag 0x10
  repair     -> npcflag 0x1000
  banker     -> npcflag 0x20000
  auctioneer -> npcflag 0x200000
Saved/loaded via the JSON spawn file, exported to creature_template.npcflag,
exposed as checkboxes in the NPC template panel. Lets users build full
city NPCs (city auctioneer, weapon trainer, etc.) without dropping to SQL.
This commit is contained in:
Kelsi 2026-05-06 04:03:23 -07:00
parent bc6e60c6e9
commit 99aaab3aa8
4 changed files with 23 additions and 1 deletions

View file

@ -50,11 +50,16 @@ bool SQLExporter::exportCreatures(const std::vector<CreatureSpawn>& spawns,
const auto& s = spawns[i];
uint32_t entry = startEntry + static_cast<uint32_t>(i);
// AzerothCore creature_template.npcflag bits.
uint32_t npcFlags = 0;
if (s.questgiver) npcFlags |= 0x02;
if (s.trainer) npcFlags |= 0x10;
if (s.vendor) npcFlags |= 0x80;
if (s.flightmaster) npcFlags |= 0x02000000;
if (s.repair) npcFlags |= 0x1000;
if (s.innkeeper) npcFlags |= 0x10000;
if (s.banker) npcFlags |= 0x20000;
if (s.auctioneer) npcFlags |= 0x200000;
if (s.flightmaster) npcFlags |= 0x02000000;
uint32_t unitFlags = 0;
if (!s.hostile) unitFlags |= 0x02; // NON_ATTACKABLE