CvUnit::canMoveOrAttackInto(const CvPlot &, byte) const
- Defined in
- CvUnit.cpp, line 3381
- Class
- CvUnit
- Hook name
CivHooks::CvUnit_canMoveOrAttackInto
Hooks
static bool BeforeCvUnit_canMoveOrAttackInto(const CvUnit* self, const CvPlot& plot, byte bMoveFlags, bool& result);static void AfterCvUnit_canMoveOrAttackInto(const CvUnit* self, const CvPlot& plot, byte bMoveFlags, bool& result);static bool ReplaceCvUnit_canMoveOrAttackInto(bool (*original)(const CvUnit*, const CvPlot&, byte), const CvUnit* self, const CvPlot& plot, byte bMoveFlags);CivRegisterBefore<CivHooks::CvUnit_canMoveOrAttackInto>(host, &BeforeCvUnit_canMoveOrAttackInto);CivRegisterAfter<CivHooks::CvUnit_canMoveOrAttackInto>(host, &AfterCvUnit_canMoveOrAttackInto);CivRegisterReplace<CivHooks::CvUnit_canMoveOrAttackInto>(host, &ReplaceCvUnit_canMoveOrAttackInto);
Code
3381bool CvUnit::canMoveOrAttackInto(const CvPlot& plot, byte bMoveFlags) const3382{3383 VALIDATE_OBJECT3384 return (canMoveInto(plot, bMoveFlags & ~(MOVEFLAG_ATTACK)) || canMoveInto(plot, bMoveFlags | MOVEFLAG_ATTACK));3385}
Calls
Called by
- PathDestValid(int, int, const void *, CvAStar *)
- PathValid(CvAStarNode *, CvAStarNode *, int, const void *, CvAStar *)
- TacticalAnalysisMapPathValid(CvAStarNode *, CvAStarNode *, int, const void *, CvAStar *)
- CvDangerPlots::UpdateDanger(bool, bool)
- CvUnit::UnitMove(CvPlot *, bool, CvUnit *, bool)
- CvLuaUnit::lCanMoveOrAttackInto(lua_State *)