CvGlobals::WrapUnitPointer(CvUnit *)
- Defined in
- CvGlobals.cpp, line 2353
- Class
- CvGlobals
- Hook name
CivHooks::CvGlobals_WrapUnitPointer
Hooks
static bool BeforeCvGlobals_WrapUnitPointer(CvGlobals* self, CvUnit* pUnit, auto_ptr<ICvUnit1>& result);static void AfterCvGlobals_WrapUnitPointer(CvGlobals* self, CvUnit* pUnit, auto_ptr<ICvUnit1>& result);static auto_ptr<ICvUnit1> ReplaceCvGlobals_WrapUnitPointer(auto_ptr<ICvUnit1> (*original)(CvGlobals*, CvUnit*), CvGlobals* self, CvUnit* pUnit);CivRegisterBefore<CivHooks::CvGlobals_WrapUnitPointer>(host, &BeforeCvGlobals_WrapUnitPointer);CivRegisterAfter<CivHooks::CvGlobals_WrapUnitPointer>(host, &AfterCvGlobals_WrapUnitPointer);CivRegisterReplace<CivHooks::CvGlobals_WrapUnitPointer>(host, &ReplaceCvGlobals_WrapUnitPointer);
Code
2353auto_ptr<ICvUnit1> CvGlobals::WrapUnitPointer(CvUnit* pUnit)2354{2355 return auto_ptr<ICvUnit1>((NULL != pUnit)? new CvDllUnit(pUnit) : NULL);2356}
Calls
- CvDllUnit::CvDllUnit(CvUnit *)
std::auto_ptr::auto_ptrstd::auto_ptr::auto_ptrstd::auto_ptr::operator auto_ptr_ref
Called by
- CvCity::conscript()
- CvGame::cyclePlotUnits(CvPlot *, bool, bool, int)
- CvGame::doControl(ControlTypes)
- CvGame::selectAll(CvPlot *)
- CvGame::selectGroup(CvUnit *, bool, bool, bool)
- CvGame::selectUnit(CvUnit *, bool, bool, bool)
- CvNotifications::Activate(Notification &)
- CvUnit::DoUpgradeTo(UnitTypes, bool)
- CvUnit::kill(bool, PlayerTypes)
- CvUnitCombat::ResolveAirSweep(const CvCombatInfo &, uint)
- CvUnitCombat::ResolveAirUnitVsCombat(const CvCombatInfo &, uint)
- CvUnitCombat::ResolveCityMeleeCombat(const CvCombatInfo &, uint)
- CvUnitCombat::ResolveMeleeCombat(const CvCombatInfo &, uint)