Bazaar developer reference

CvUnit::changeAdmiralPort(int, int)

Defined in
CvUnit.cpp, line 7034
Class
CvUnit
Hook name
CivHooks::CvUnit_changeAdmiralPort

Hooks

static bool BeforeCvUnit_changeAdmiralPort(CvUnit* self, int iX, int iY, bool& result);static void AfterCvUnit_changeAdmiralPort(CvUnit* self, int iX, int iY, bool& result);static bool ReplaceCvUnit_changeAdmiralPort(bool (*original)(CvUnit*, int, int), CvUnit* self, int iX, int iY);CivRegisterBefore<CivHooks::CvUnit_changeAdmiralPort>(host, &BeforeCvUnit_changeAdmiralPort);CivRegisterAfter<CivHooks::CvUnit_changeAdmiralPort>(host, &AfterCvUnit_changeAdmiralPort);CivRegisterReplace<CivHooks::CvUnit_changeAdmiralPort>(host, &ReplaceCvUnit_changeAdmiralPort);

Code

7034bool CvUnit::changeAdmiralPort(int iX, int iY)7035{7036	if (!canChangeAdmiralPortAt(plot(), iX, iY))7037	{7038		return false;7039	}70407041	setXY(iX, iY);7042	setMoves(0);7043	return true;7044}

Calls

Called by