diff --git a/SKSE/Plugins/EnderalSE.dll b/SKSE/Plugins/EnderalSE.dll index 52933ee4..43066850 100644 --- a/SKSE/Plugins/EnderalSE.dll +++ b/SKSE/Plugins/EnderalSE.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce336c0722e01a31efc0a6ad98590e1be56c6454ceae93e973c9bbe966c2a106 -size 663040 +oid sha256:2e2344c3426c414b26c310d98fea8749396da77f8359b66c1fbb820a26d2ea26 +size 665088 diff --git a/source/Enderal DLL/src/CheckInvalidForms.h b/source/Enderal DLL/src/CheckInvalidForms.h index 2f9e4671..8e7b9fc6 100644 --- a/source/Enderal DLL/src/CheckInvalidForms.h +++ b/source/Enderal DLL/src/CheckInvalidForms.h @@ -1233,3 +1233,101 @@ inline void CheckUnconvertedMap() } } } + +inline void CheckEnderalContainers() +{ + // Base forms of Enderal containers, having collisions with Skyrim + uint32_t formids[13] = { + 0x17234, + 0x3661E, + 0x43BF2, + 0x4602B, + 0x469E6, + 0x46AEF, + 0x46D85, + 0x56161, + 0x56165, + 0x7BC22, + 0x967AA, + 0xF85F4, + 0x108AA7 + }; + + for (int i = 0; i < 13; i++) { + const auto* form = RE::TESForm::LookupByID(formids[i]); + if (!form || !form->Is(RE::FormType::Container)) { + logger::warn("Detected invalid container: {:08X}", formids[i]); + NotifyInvalidForm(form); + } + } +} + +inline void CheckEnderalNPCs() +{ + // Base forms of Enderal actors, having collisions with Skyrim + uint32_t formids[55] = { + 0x1722B, + 0x1723A, + 0x1A4E0, + 0x22FA4, + 0x22FA6, + 0x23133, + 0x2320C, + 0x25D20, + 0x2A006, + 0x3280A, + 0x365F6, + 0x36613, + 0x366F0, + 0x3675D, + 0x39F58, + 0x3C599, + 0x447BE, + 0x447F3, + 0x469E2, + 0x469E3, + 0x469E4, + 0x46AF6, + 0x46AF7, + 0x46D83, + 0x46D84, + 0x46DFB, + 0x46EE4, + 0x46EF1, + 0x46EF2, + 0x46EF3, + 0x4838F, + 0x7265B, + 0x7265E, + 0x72660, + 0x92A62, + 0x92A64, + 0x954D9, + 0x967F9, + 0xA8608, + 0xA860B, + 0xA8614, + 0xA861E, + 0xA9623, + 0xBED8B, + 0xCC95C, + 0xDD714, + 0xE48FA, + 0xEA717, + 0xEA71A, + 0x103269, + 0x1032B9, + 0x1032C7, + 0x1032CB, + 0x1032CC, + 0x1033FE + }; + + for (int i = 0; i < 55; i++) { + const auto* form = RE::TESForm::LookupByID(formids[i]); + if (!form || !form->Is(RE::FormType::NPC)) { + logger::warn("Detected invalid actor: {:08X}", formids[i]); + NotifyInvalidForm(form); + } + } +} diff --git a/source/Enderal DLL/src/Util.h b/source/Enderal DLL/src/Util.h index 7255185b..96a2cca7 100644 --- a/source/Enderal DLL/src/Util.h +++ b/source/Enderal DLL/src/Util.h @@ -63,6 +63,8 @@ inline void CheckIncompatibleMods() CheckUnconvertedMap(); CheckSkyrimCells(); CheckEnderalCells(); + CheckEnderalContainers(); + CheckEnderalNPCs(); } inline void LoadINI(std::map* settings, const char* iniPath)