Bazaar developer reference

CvPlayer::SetAnarchyNumTurns(int)

Defined in
CvPlayer.cpp, line 13462
Class
CvPlayer
Hook name
CivHooks::CvPlayer_SetAnarchyNumTurns

Hooks

static bool BeforeCvPlayer_SetAnarchyNumTurns(CvPlayer* self, int iValue);static void AfterCvPlayer_SetAnarchyNumTurns(CvPlayer* self, int iValue);static void ReplaceCvPlayer_SetAnarchyNumTurns(void (*original)(CvPlayer*, int), CvPlayer* self, int iValue);CivRegisterBefore<CivHooks::CvPlayer_SetAnarchyNumTurns>(host, &BeforeCvPlayer_SetAnarchyNumTurns);CivRegisterAfter<CivHooks::CvPlayer_SetAnarchyNumTurns>(host, &AfterCvPlayer_SetAnarchyNumTurns);CivRegisterReplace<CivHooks::CvPlayer_SetAnarchyNumTurns>(host, &ReplaceCvPlayer_SetAnarchyNumTurns);

Code

13461/// Empire in Anarchy?13462void CvPlayer::SetAnarchyNumTurns(int iValue)13463{13464	if(iValue != GetAnarchyNumTurns())13465	{13466		m_iAnarchyNumTurns = iValue;1346713468		if(GetID() == GC.getGame().getActivePlayer())13469		{13470			GC.GetEngineUserInterface()->setDirty(GameData_DIRTY_BIT, true);13471		}13472	}13473}

Calls

Called by