CvEntityEventInfo::CacheResults(Database::Results &, CvDatabaseUtility &)
- Defined in
- CvInfos.cpp, line 6565
- Class
- CvEntityEventInfo
- Hook name
CivHooks::CvEntityEventInfo_CacheResults- Overrides
- CvBaseInfo::CacheResults(Database::Results &, CvDatabaseUtility &)
Hooks
static bool BeforeCvEntityEventInfo_CacheResults(CvEntityEventInfo* self, Database::Results& kResults, CvDatabaseUtility& kUtility, bool& result);static void AfterCvEntityEventInfo_CacheResults(CvEntityEventInfo* self, Database::Results& kResults, CvDatabaseUtility& kUtility, bool& result);static bool ReplaceCvEntityEventInfo_CacheResults(bool (*original)(CvEntityEventInfo*, Database::Results&, CvDatabaseUtility&), CvEntityEventInfo* self, Database::Results& kResults, CvDatabaseUtility& kUtility);CivRegisterBefore<CivHooks::CvEntityEventInfo_CacheResults>(host, &BeforeCvEntityEventInfo_CacheResults);CivRegisterAfter<CivHooks::CvEntityEventInfo_CacheResults>(host, &AfterCvEntityEventInfo_CacheResults);CivRegisterReplace<CivHooks::CvEntityEventInfo_CacheResults>(host, &ReplaceCvEntityEventInfo_CacheResults);
Code
6565bool CvEntityEventInfo::CacheResults(Database::Results& kResults, CvDatabaseUtility& kUtility)6566{6567 if(!CvBaseInfo::CacheResults(kResults, kUtility))6568 return false;65696570 m_bUpdateFormation = kResults.GetBool("UpdateFormation");65716572 const char* szEntityEventType = GetType();65736574 //EntityEvent_AnimationPaths6575 {6576 std::string strKey = "EntityEventInfo - AnimationPaths";6577 Database::Results* pResults = kUtility.GetResults(strKey);6578 if(pResults == NULL)6579 {6580 pResults = kUtility.PrepareResults(strKey, "select AnimationPaths.ID from EntityEvent_AnimationPaths inner join AnimationPaths on AnimationPathType = AnimationPaths.Type where EntityEventType = ?");6581 }65826583 pResults->Bind(1, szEntityEventType, -1, false);65846585 while(pResults->Step())6586 {6587 const AnimationPathTypes eAnimationPath = (AnimationPathTypes)pResults->GetInt(0);6588 m_vctAnimationPathType.push_back(eAnimationPath);6589 }65906591 pResults->Reset();6592 }65936594 return true;6595}
Calls
- CvBaseInfo::CacheResults(Database::Results &, CvDatabaseUtility &)
- CvBaseInfo::GetType() const
- CvDatabaseUtility::GetResults(const std::string &)
- CvDatabaseUtility::PrepareResults(const std::string &, const char *)
Database::Results::BindDatabase::Results::GetBoolDatabase::Results::GetIntDatabase::Results::ResetDatabase::Results::Stepstd::basic_string::basic_stringstd::vector::push_back