finish PreDelete and CheckPreDeletion. now there is no problem when deleting object

This commit is contained in:
2023-09-20 15:25:43 +08:00
parent a06f6a58c9
commit 81872053f0
16 changed files with 100 additions and 28 deletions

View File

@ -98,7 +98,7 @@ namespace LibCmo::XContainer {
} else {
obj = item;
}
if (EnumsHelper::Has(obj->GetObjectFlags(), CK2::CK_OBJECT_FLAGS::CK_OBJECT_TOBEDELETED)) return false;
if (obj->IsToBeDeleted()) return false;
} else {
CK2::MgrImpls::CKObjectManager* objmgr = ctx->GetObjectManager();
if constexpr (std::is_same_v<_Ty, CK2::CK_ID>) {