diff --git a/include/RE/E/ExtraDataList.h b/include/RE/E/ExtraDataList.h index 98e891596..baec37472 100644 --- a/include/RE/E/ExtraDataList.h +++ b/include/RE/E/ExtraDataList.h @@ -181,6 +181,7 @@ namespace RE TESForm* GetOwner(); SOUL_LEVEL GetSoulLevel() const; ObjectRefHandle GetTeleportLinkedDoor(); + bool HasQuestObjectAlias(); void SetCount(std::uint16_t a_count); void SetEncounterZone(BGSEncounterZone* a_zone); void SetExtraFlags(ExtraFlags::Flag a_flags, bool a_enable); diff --git a/src/RE/E/ExtraDataList.cpp b/src/RE/E/ExtraDataList.cpp index bbf0b83ba..7d3b546df 100644 --- a/src/RE/E/ExtraDataList.cpp +++ b/src/RE/E/ExtraDataList.cpp @@ -282,7 +282,14 @@ namespace RE ObjectRefHandle(); } - void ExtraDataList::SetCount(std::uint16_t a_count) + bool ExtraDataList::HasQuestObjectAlias() + { + using func_t = decltype(&ExtraDataList::HasQuestObjectAlias); + REL::Relocation func{ RELOCATION_ID(11913, 12052) }; + return func(this); + } + + void ExtraDataList::SetCount(std::uint16_t a_count) { using func_t = decltype(&ExtraDataList::SetCount); REL::Relocation func{ Offset::ExtraDataList::SetCount }; diff --git a/src/RE/I/InventoryEntryData.cpp b/src/RE/I/InventoryEntryData.cpp index 18402da92..2c467664e 100644 --- a/src/RE/I/InventoryEntryData.cpp +++ b/src/RE/I/InventoryEntryData.cpp @@ -245,9 +245,15 @@ namespace RE bool InventoryEntryData::IsQuestObject() const { - using func_t = decltype(&InventoryEntryData::IsQuestObject); - REL::Relocation func{ RELOCATION_ID(15767, 16005) }; - return func(this); + if (extraLists) { + for (const auto& xList : *extraLists) { + if (xList && xList->HasQuestObjectAlias()) { + return true; + } + } + } + + return false; } void InventoryEntryData::PoisonObject(AlchemyItem* a_alchItem, std::uint32_t a_count)