Bazaar developer reference

CvGlobals::UnwrapUnitPointer(ICvUnit1 *)

Defined in
CvGlobals.cpp, line 2358
Class
CvGlobals
Hook name
CivHooks::CvGlobals_UnwrapUnitPointer

Hooks

static bool BeforeCvGlobals_UnwrapUnitPointer(CvGlobals* self, ICvUnit1* pUnit, CvUnit*& result);static void AfterCvGlobals_UnwrapUnitPointer(CvGlobals* self, ICvUnit1* pUnit, CvUnit*& result);static CvUnit* ReplaceCvGlobals_UnwrapUnitPointer(CvUnit* (*original)(CvGlobals*, ICvUnit1*), CvGlobals* self, ICvUnit1* pUnit);CivRegisterBefore<CivHooks::CvGlobals_UnwrapUnitPointer>(host, &BeforeCvGlobals_UnwrapUnitPointer);CivRegisterAfter<CivHooks::CvGlobals_UnwrapUnitPointer>(host, &AfterCvGlobals_UnwrapUnitPointer);CivRegisterReplace<CivHooks::CvGlobals_UnwrapUnitPointer>(host, &ReplaceCvGlobals_UnwrapUnitPointer);

Code

2358CvUnit* CvGlobals::UnwrapUnitPointer(ICvUnit1* pUnit)2359{2360	return (NULL != pUnit)? static_cast<CvDllUnit*>(pUnit)->GetInstance() : NULL;2361}

Calls

Called by