Bazaar developer reference

CvTeam::getSecretaryID() const

Defined in
CvTeam.cpp, line 2652
Class
CvTeam
Hook name
CivHooks::CvTeam_getSecretaryID

Hooks

static bool BeforeCvTeam_getSecretaryID(const CvTeam* self, PlayerTypes& result);static void AfterCvTeam_getSecretaryID(const CvTeam* self, PlayerTypes& result);static PlayerTypes ReplaceCvTeam_getSecretaryID(PlayerTypes (*original)(const CvTeam*), const CvTeam* self);CivRegisterBefore<CivHooks::CvTeam_getSecretaryID>(host, &BeforeCvTeam_getSecretaryID);CivRegisterAfter<CivHooks::CvTeam_getSecretaryID>(host, &AfterCvTeam_getSecretaryID);CivRegisterReplace<CivHooks::CvTeam_getSecretaryID>(host, &ReplaceCvTeam_getSecretaryID);

Code

2652PlayerTypes CvTeam::getSecretaryID() const2653{2654	int iI;26552656	for(iI = 0; iI < MAX_PLAYERS; iI++)2657	{2658		if(GET_PLAYER((PlayerTypes)iI).isAlive())2659		{2660			if(GET_PLAYER((PlayerTypes)iI).isHuman())2661			{2662				if(GET_PLAYER((PlayerTypes)iI).getTeam() == GetID())2663				{2664					return ((PlayerTypes)iI);2665				}2666			}2667		}2668	}26692670	return getLeaderID();2671}

Calls

Called by