CvPlayer::getLeaderInfo() const
- Defined in
- CvPlayer.cpp, line 18495
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_getLeaderInfo
Hooks
static bool BeforeCvPlayer_getLeaderInfo(const CvPlayer* self, CvLeaderHeadInfo*& result);static void AfterCvPlayer_getLeaderInfo(const CvPlayer* self, CvLeaderHeadInfo*& result);static CvLeaderHeadInfo& ReplaceCvPlayer_getLeaderInfo(CvLeaderHeadInfo& (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_getLeaderInfo>(host, &BeforeCvPlayer_getLeaderInfo);CivRegisterAfter<CivHooks::CvPlayer_getLeaderInfo>(host, &AfterCvPlayer_getLeaderInfo);CivRegisterReplace<CivHooks::CvPlayer_getLeaderInfo>(host, &ReplaceCvPlayer_getLeaderInfo);
Code
18495CvLeaderHeadInfo& CvPlayer::getLeaderInfo() const18496{18497 CvLeaderHeadInfo* pkLeaderInfo = GC.getLeaderHeadInfo(getLeaderType());18498 if(pkLeaderInfo == NULL)18499 {18500 const char* szError = "ERROR: Player does not contain valid leader type!!";18501 GC.LogMessage(szError);18502 CvAssertMsg(false, szError);18503 }1850418505#pragma warning ( push )18506#pragma warning ( disable : 6011 ) // Dereferencing NULL pointer18507 return *pkLeaderInfo;18508#pragma warning ( pop )18509}
Calls
Called by
- CultureHelpers::SendArtSwapNotification(GreatWorkSlotType, bool, PlayerTypes, PlayerTypes, int, int)
- CvDiplomacyAI::DoInitializePersonality()
- CvDiplomacyAI::GetDiploTextFromTag(const char *, const Localization::String &, const Localization::String &)
- CvPlayer::getLeaderTypeKey() const
- CvPlayer::getName() const
- CvPlayer::getNameKey() const
- CvPlayerTechs::Reset()
- CvPlayerTraits::HasTrait(TraitTypes) const