CvPreGame::setDLCAllowed(const GUID &, bool)
- Defined in
- CvPreGame.cpp, line 3319
- Hook name
CivHooks::CvPreGame_setDLCAllowed
Hooks
static bool BeforeCvPreGame_setDLCAllowed(const GUID& kDLCID, bool bState);static void AfterCvPreGame_setDLCAllowed(const GUID& kDLCID, bool bState);static void ReplaceCvPreGame_setDLCAllowed(void (*original)(const GUID&, bool), const GUID& kDLCID, bool bState);CivRegisterBefore<CivHooks::CvPreGame_setDLCAllowed>(host, &BeforeCvPreGame_setDLCAllowed);CivRegisterAfter<CivHooks::CvPreGame_setDLCAllowed>(host, &AfterCvPreGame_setDLCAllowed);CivRegisterReplace<CivHooks::CvPreGame_setDLCAllowed>(host, &ReplaceCvPreGame_setDLCAllowed);
Code
3318// Set whether or not the DLC is allowed in the game3319void setDLCAllowed(const GUID& kDLCID, bool bState)3320{3321 if(bState)3322 {3323 if(!isDLCAllowed(kDLCID))3324 s_AllowedDLC.push_back(kDLCID);3325 }3326 else3327 {3328 for(PackageIDList::const_iterator itr = s_AllowedDLC.begin(); itr != s_AllowedDLC.end(); ++itr)3329 {3330 if(memcmp(&kDLCID, &(*itr), sizeof(GUID)) == 0)3331 {3332 s_AllowedDLC.erase(itr);3333 break;3334 }3335 }3336 }3337}
Calls
- CvPreGame::isDLCAllowed(const GUID &)
memcmpstd::list::_Const_iterator::_Const_iteratorstd::list::_Const_iterator::_Const_iteratorstd::list::_Const_iterator::operator!=std::list::_Const_iterator::operator*std::list::_Const_iterator::operator++std::list::beginstd::list::endstd::list::erasestd::list::push_back