CvPreGame::isDLCAllowed(const GUID &)
- Defined in
- CvPreGame.cpp, line 3305
- Hook name
CivHooks::CvPreGame_isDLCAllowed
Hooks
static bool BeforeCvPreGame_isDLCAllowed(const GUID& kDLCID, bool& result);static void AfterCvPreGame_isDLCAllowed(const GUID& kDLCID, bool& result);static bool ReplaceCvPreGame_isDLCAllowed(bool (*original)(const GUID&), const GUID& kDLCID);CivRegisterBefore<CivHooks::CvPreGame_isDLCAllowed>(host, &BeforeCvPreGame_isDLCAllowed);CivRegisterAfter<CivHooks::CvPreGame_isDLCAllowed>(host, &AfterCvPreGame_isDLCAllowed);CivRegisterReplace<CivHooks::CvPreGame_isDLCAllowed>(host, &ReplaceCvPreGame_isDLCAllowed);
Code
3304// Return true if the DLC is allowed in the game3305bool isDLCAllowed(const GUID& kDLCID)3306{3307 for(PackageIDList::const_iterator itr = s_AllowedDLC.begin(); itr != s_AllowedDLC.end(); ++itr)3308 {3309 if(memcmp(&kDLCID, &(*itr), sizeof(GUID)) == 0)3310 {3311 return true;3312 }3313 }33143315 return false;3316}
Calls
memcmpstd::list::_Const_iterator::_Const_iteratorstd::list::_Const_iterator::operator!=std::list::_Const_iterator::operator*std::list::_Const_iterator::operator++std::list::beginstd::list::end