CvGame::victoryDelay(VictoryTypes) const
- Defined in
- CvGame.cpp, line 4108
- Class
- CvGame
- Hook name
CivHooks::CvGame_victoryDelay
Hooks
static bool BeforeCvGame_victoryDelay(const CvGame* self, VictoryTypes eVictory, int& result);static void AfterCvGame_victoryDelay(const CvGame* self, VictoryTypes eVictory, int& result);static int ReplaceCvGame_victoryDelay(int (*original)(const CvGame*, VictoryTypes), const CvGame* self, VictoryTypes eVictory);CivRegisterBefore<CivHooks::CvGame_victoryDelay>(host, &BeforeCvGame_victoryDelay);CivRegisterAfter<CivHooks::CvGame_victoryDelay>(host, &AfterCvGame_victoryDelay);CivRegisterReplace<CivHooks::CvGame_victoryDelay>(host, &ReplaceCvGame_victoryDelay);
Code
4108int CvGame::victoryDelay(VictoryTypes eVictory) const4109{4110 CvAssert(eVictory >= 0 && eVictory < GC.getNumVictoryInfos());41114112 CvVictoryInfo* pkVictoryInfo = GC.getVictoryInfo(eVictory);4113 CvAssert(pkVictoryInfo);41144115 if(pkVictoryInfo == NULL)4116 return 0;41174118 int iLength = pkVictoryInfo->getVictoryDelayTurns();41194120 iLength *= getGameSpeedInfo().getVictoryDelayPercent();4121 iLength /= 100;41224123 return iLength;4124}