Hooks
static bool BeforeCalculateDigSiteWeights(int iGridSize, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>& inputData, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>& chosenDigSites, FFastVector<int, true, c_eCiv5GameplayDLL, 0>& currentWeights);static void AfterCalculateDigSiteWeights(int iGridSize, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>& inputData, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>& chosenDigSites, FFastVector<int, true, c_eCiv5GameplayDLL, 0>& currentWeights);static void ReplaceCalculateDigSiteWeights(void (*original)(int, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>&, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>&, FFastVector<int, true, c_eCiv5GameplayDLL, 0>&), int iGridSize, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>& inputData, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>& chosenDigSites, FFastVector<int, true, c_eCiv5GameplayDLL, 0>& currentWeights);CivRegisterBefore<CivHooks::CalculateDigSiteWeights>(host, &BeforeCalculateDigSiteWeights);CivRegisterAfter<CivHooks::CalculateDigSiteWeights>(host, &AfterCalculateDigSiteWeights);CivRegisterReplace<CivHooks::CalculateDigSiteWeights>(host, &ReplaceCalculateDigSiteWeights);
Code
11482void CalculateDigSiteWeights(int iGridSize, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>& inputData, FFastVector<CvArchaeologyData, true, c_eCiv5GameplayDLL, 0>& chosenDigSites, FFastVector<int, true, c_eCiv5GameplayDLL, 0>& currentWeights)11483{11484 CvAssertMsg(NO_GREAT_WORK_ARTIFACT_CLASS == 0, "Value of NO_ARTIFACT has changed");11485 for (int i = 0; i < iGridSize; i++)11486 {11487 currentWeights[i] = CalculateDigSiteWeight(i, inputData, chosenDigSites);11488 }11489}