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
- AttackPathAdd(CvAStarNode *, CvAStarNode *, int, const void *, CvAStar *)
- CvDllGameContext::TEMPCalculatePathFinderUpdates(ICvUnit1 *, int, int)
- CvDllGameContext::TEMPOnHexUnitChanged(ICvUnit1 *)
- CvDllGameContext::TEMPOnHexUnitChangedAttack(ICvUnit1 *)
- CvDllGame::CanMoveUnitTo(ICvUnit1 *, ICvPlot1 *) const
- CvGame::canHandleAction(int, CvPlot *, bool)
- CvGame::cycleUnits(bool, bool, bool)
- CvGame::doControl(ControlTypes)
- CvGame::handleAction(int)
- CvGame::mouseoverUnit(CvUnit *, bool)
- CvGame::selectUnit(CvUnit *, bool, bool, bool)
- CvGame::selectionListGameNetMessage(int, int, int, int, int, bool, bool)
- CvGame::selectionListIgnoreBuildingDefense()
- CvGame::selectionListMove(CvPlot *, bool)
- CvGame::updateSelectionList()
- CvGameTrade::DisplayTemporaryPopupTradeRoute(int, int, TradeConnectionType, DomainTypes)
- CvUnitCycler::Rebuild(CvUnit *)
- CvLuaPlayer::lGetRecommendedFoundCityPlots(lua_State *)
- CvLuaPlayer::lGetRecommendedWorkerPlots(lua_State *)