diff --git a/components/esm/defs_ai.hpp b/components/esm/defs_ai.hpp index a7f2a26ea..b14cc7d65 100644 --- a/components/esm/defs_ai.hpp +++ b/components/esm/defs_ai.hpp @@ -93,7 +93,6 @@ namespace ESM AIPackage pack; esm.getSubName(); - std::cout << esm.retSubName().toString() << std::endl; if (esm.retSubName() == 0x54444e43) { // CNDT list.back().cellName = esm.getHString(); } else if (esm.retSubName() == AI_Wander) { diff --git a/components/esm/loadcrea.cpp b/components/esm/loadcrea.cpp index 8af3526a0..fcef9ccd4 100644 --- a/components/esm/loadcrea.cpp +++ b/components/esm/loadcrea.cpp @@ -18,6 +18,7 @@ void Creature::load(ESMReader &esm, const std::string& id) esm.getHNOT(scale, "XSCL"); inventory.load(esm); + spells.load(esm); if (esm.isNextSub("AIDT")) { @@ -27,20 +28,8 @@ void Creature::load(ESMReader &esm, const std::string& id) else hasAI = false; - // More subrecords: - // AI_W - wander (14 bytes, i don't understand it) - // short distance - // byte duration - // byte timeOfDay - // byte idle[10] - // - // Rest is optional: - // AI_T - travel? - // AI_F - follow? - // AI_E - escort? - // AI_A - activate? + aiPack.load(esm); esm.skipRecord(); - } } diff --git a/components/esm/loadcrea.hpp b/components/esm/loadcrea.hpp index 364b10eeb..9db1f3fff 100644 --- a/components/esm/loadcrea.hpp +++ b/components/esm/loadcrea.hpp @@ -3,6 +3,7 @@ #include "esm_reader.hpp" #include "loadcont.hpp" +#include "defs.hpp" #include "defs_ai.hpp" namespace ESM @@ -61,9 +62,11 @@ struct Creature // Defined in loadcont.hpp InventoryList inventory; + SpellList spells; bool hasAI; AIDTstruct AI; + AIPackageList aiPack; std::string mId;