CvPlayerEspionage::IsTechStealable(PlayerTypes, TechTypes)
- Defined in
- CvEspionageClasses.cpp, line 2685
- Class
- CvPlayerEspionage
- Hook name
CivHooks::CvPlayerEspionage_IsTechStealable
Hooks
static bool BeforeCvPlayerEspionage_IsTechStealable(CvPlayerEspionage* self, PlayerTypes ePlayer, TechTypes eTech, bool& result);static void AfterCvPlayerEspionage_IsTechStealable(CvPlayerEspionage* self, PlayerTypes ePlayer, TechTypes eTech, bool& result);static bool ReplaceCvPlayerEspionage_IsTechStealable(bool (*original)(CvPlayerEspionage*, PlayerTypes, TechTypes), CvPlayerEspionage* self, PlayerTypes ePlayer, TechTypes eTech);CivRegisterBefore<CivHooks::CvPlayerEspionage_IsTechStealable>(host, &BeforeCvPlayerEspionage_IsTechStealable);CivRegisterAfter<CivHooks::CvPlayerEspionage_IsTechStealable>(host, &AfterCvPlayerEspionage_IsTechStealable);CivRegisterReplace<CivHooks::CvPlayerEspionage_IsTechStealable>(host, &ReplaceCvPlayerEspionage_IsTechStealable);
Code
2684/// IsTechStealable - Check to see if you can steal this tech from an opponent2685bool CvPlayerEspionage::IsTechStealable(PlayerTypes ePlayer, TechTypes eTech)2686{2687 CvAssertMsg((uint)ePlayer < m_aaPlayerStealableTechList.size(), "ePlayer out of bounds");2688 if((uint)ePlayer >= m_aaPlayerStealableTechList.size())2689 {2690 return false;2691 }26922693 for(uint ui = 0; ui < m_aaPlayerStealableTechList[ePlayer].size(); ui++)2694 {2695 if(m_aaPlayerStealableTechList[ePlayer][ui] == eTech)2696 {2697 return true;2698 }2699 }27002701 return false;2702}
Calls
BaseVector::operator[]BaseVector::operator[]BaseVector::sizeBaseVector::size