CvUnit::setAttackPlot(const CvPlot *, bool)
- Defined in
- CvUnit.cpp, line 17428
- Class
- CvUnit
- Hook name
CivHooks::CvUnit_setAttackPlot
Hooks
static bool BeforeCvUnit_setAttackPlot(CvUnit* self, const CvPlot* pNewValue, bool bAirCombat);static void AfterCvUnit_setAttackPlot(CvUnit* self, const CvPlot* pNewValue, bool bAirCombat);static void ReplaceCvUnit_setAttackPlot(void (*original)(CvUnit*, const CvPlot*, bool), CvUnit* self, const CvPlot* pNewValue, bool bAirCombat);CivRegisterBefore<CivHooks::CvUnit_setAttackPlot>(host, &BeforeCvUnit_setAttackPlot);CivRegisterAfter<CivHooks::CvUnit_setAttackPlot>(host, &AfterCvUnit_setAttackPlot);CivRegisterReplace<CivHooks::CvUnit_setAttackPlot>(host, &ReplaceCvUnit_setAttackPlot);
Code
17428void CvUnit::setAttackPlot(const CvPlot* pNewValue, bool bAirCombat)17429{17430 VALIDATE_OBJECT17431 if(getAttackPlot() != pNewValue)17432 {17433 if(pNewValue != NULL)17434 {17435 m_iAttackPlotX = pNewValue->getX();17436 m_iAttackPlotY = pNewValue->getY();17437 }17438 else17439 {17440 m_iAttackPlotX = INVALID_PLOT_COORD;17441 m_iAttackPlotY = INVALID_PLOT_COORD;17442 }17443 }1744417445 m_bAirCombat = bAirCombat;17446}
Calls
- CvPlot::getX() const
- CvPlot::getY() const
- CvUnit::getAttackPlot() const
FAutoVariable::operator=FAutoVariable::operator=