Bazaar developer reference

CvPlayer::IsAtWarWith(PlayerTypes) const

Defined in
CvPlayer.cpp, line 28297
Class
CvPlayer
Hook name
CivHooks::CvPlayer_IsAtWarWith

Hooks

static bool BeforeCvPlayer_IsAtWarWith(const CvPlayer* self, PlayerTypes iPlayer, bool& result);static void AfterCvPlayer_IsAtWarWith(const CvPlayer* self, PlayerTypes iPlayer, bool& result);static bool ReplaceCvPlayer_IsAtWarWith(bool (*original)(const CvPlayer*, PlayerTypes), const CvPlayer* self, PlayerTypes iPlayer);CivRegisterBefore<CivHooks::CvPlayer_IsAtWarWith>(host, &BeforeCvPlayer_IsAtWarWith);CivRegisterAfter<CivHooks::CvPlayer_IsAtWarWith>(host, &AfterCvPlayer_IsAtWarWith);CivRegisterReplace<CivHooks::CvPlayer_IsAtWarWith>(host, &ReplaceCvPlayer_IsAtWarWith);

Code

28297bool CvPlayer::IsAtWarWith(PlayerTypes iPlayer) const28298{28299	CvTeam& kTeam = GET_TEAM(getTeam());2830028301	return (iPlayer >= 0 && iPlayer < MAX_PLAYERS && kTeam.isAtWar(GET_PLAYER(iPlayer).getTeam()));28302}

Calls

Called by