src/TESForms/TESForm.cpp
//Get all keywords for forms that store keywords in the normal location
Get all keywords for forms that store keywords in the normal location
Get all keywords for forms that store keywords in the normal location
void GetKeywords(ExtraInfoEntry*& resultArray, RE::BGSKeywordForm* keywordForm)
{
	logger::debug("GetKeywords Start");
	if (keywordForm) {
		ExtraInfoEntry* keywordsEntry;
		CreateExtraInfoEntry(keywordsEntry, "Keywords", "", priority_Keywords);
		logger::debug("GetKeywords Before crash");
		for (uint32_t i = 0; i < keywordForm->numKeywords; i++) {
			RE::BGSKeyword* keyword = *(keywordForm->GetKeywordAt(i));
			if (keyword && ((keyword->formID & 0xFF000000) != 0xFF000000))  
			{
				ExtraInfoEntry* keywordEntry;
				std::string keywordName = GetName(keyword);
				CreateExtraInfoEntry(keywordEntry, keywordName, "", priority_Keywords);
				GetFormData(keywordEntry, keyword, nullptr);
				keywordsEntry->PushBack(keywordEntry);
			}
		}
		resultArray->PushBack(keywordsEntry);
	}
	logger::debug("GetKeywords End");
}
void GetKeywords ( ExtraInfoEntry * & resultArray , RE :: BGSKeywordForm * keywordForm ) { logger :: debug ( " " ) ; if ( keywordForm ) { ExtraInfoEntry * keywordsEntry ; CreateExtraInfoEntry ( keywordsEntry , " " , " " , priority_Keywords ) ; logger :: debug ( " " ) ; for ( uint32_t i = 0 ; i < keywordForm -> numKeywords ; i ++ ) { RE :: BGSKeyword * keyword = * ( keywordForm -> GetKeywordAt ( i ) ) ; if ( keyword && ( ( keyword -> formID & 0xFF000000 ) != 0xFF000000 ) ) { ExtraInfoEntry * keywordEntry ; std :: string keywordName = GetName ( keyword ) ; CreateExtraInfoEntry ( keywordEntry , keywordName , " " , priority_Keywords ) ; GetFormData ( keywordEntry , keyword , nullptr ) ; keywordsEntry -> PushBack ( keywordEntry ) ; } } resultArray -> PushBack ( keywordsEntry ) ; } logger :: debug ( " " ) ; }
Get all keywords for forms that store keywords in the normal location
Get all keywords for forms that store keywords in the normal location
//There was a strange Keyword with a formid starting with FF that is causing a crash. There must be some skse plugin reponsible for this //as it can't be created by normal methods. For now I want to filter those keywords out