mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 01:23:52 +00:00
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:
parent
bc6e60c6e9
commit
99aaab3aa8
4 changed files with 23 additions and 1 deletions
|
|
@ -85,6 +85,10 @@ bool NpcSpawner::saveToFile(const std::string& path) const {
|
|||
js["vendor"] = s.vendor;
|
||||
js["flightmaster"] = s.flightmaster;
|
||||
js["innkeeper"] = s.innkeeper;
|
||||
js["trainer"] = s.trainer;
|
||||
js["auctioneer"] = s.auctioneer;
|
||||
js["banker"] = s.banker;
|
||||
js["repair"] = s.repair;
|
||||
|
||||
nlohmann::json patrol = nlohmann::json::array();
|
||||
for (const auto& p : s.patrolPath) {
|
||||
|
|
@ -156,6 +160,10 @@ bool NpcSpawner::loadFromFile(const std::string& path) {
|
|||
s.vendor = js.value("vendor", false);
|
||||
s.flightmaster = js.value("flightmaster", false);
|
||||
s.innkeeper = js.value("innkeeper", false);
|
||||
s.trainer = js.value("trainer", false);
|
||||
s.auctioneer = js.value("auctioneer", false);
|
||||
s.banker = js.value("banker", false);
|
||||
s.repair = js.value("repair", false);
|
||||
|
||||
if (js.contains("position") && js["position"].is_array() && js["position"].size() >= 3) {
|
||||
s.position = glm::vec3(js["position"][0].get<float>(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue