Bazaar developer reference

PUF_cannotDefend(const CvUnit *, int, int)

Defined in
CvGameCoreUtils.cpp, line 803
Hook name
CivHooks::PUF_cannotDefend

Hooks

static bool BeforePUF_cannotDefend(const CvUnit* pUnit, int arg1, int arg2, bool& result);static void AfterPUF_cannotDefend(const CvUnit* pUnit, int arg1, int arg2, bool& result);static bool ReplacePUF_cannotDefend(bool (*original)(const CvUnit*, int, int), const CvUnit* pUnit, int arg1, int arg2);CivRegisterBefore<CivHooks::PUF_cannotDefend>(host, &BeforePUF_cannotDefend);CivRegisterAfter<CivHooks::PUF_cannotDefend>(host, &AfterPUF_cannotDefend);CivRegisterReplace<CivHooks::PUF_cannotDefend>(host, &ReplacePUF_cannotDefend);

Code

803bool PUF_cannotDefend(const CvUnit* pUnit, int, int)804{805	return !(pUnit->IsCanDefend());806}

Calls