Bazaar developer reference

CvDllNetMessageHandler::ResponseGoodyChoice(PlayerTypes, int, int, GoodyTypes, int)

Defined in
CvDllNetMessageHandler.cpp, line 800
Class
CvDllNetMessageHandler
Hook name
CivHooks::CvDllNetMessageHandler_ResponseGoodyChoice

Hooks

static bool BeforeCvDllNetMessageHandler_ResponseGoodyChoice(CvDllNetMessageHandler* self, PlayerTypes ePlayer, int iPlotX, int iPlotY, GoodyTypes eGoody, int iUnitID);static void AfterCvDllNetMessageHandler_ResponseGoodyChoice(CvDllNetMessageHandler* self, PlayerTypes ePlayer, int iPlotX, int iPlotY, GoodyTypes eGoody, int iUnitID);static void ReplaceCvDllNetMessageHandler_ResponseGoodyChoice(void (*original)(CvDllNetMessageHandler*, PlayerTypes, int, int, GoodyTypes, int), CvDllNetMessageHandler* self, PlayerTypes ePlayer, int iPlotX, int iPlotY, GoodyTypes eGoody, int iUnitID);// CivHooks.h gives this hook point no types, so nothing checks these hooks' parameters.host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseGoodyChoice::ID, CIV_HOOK_BEFORE, (void*)&BeforeCvDllNetMessageHandler_ResponseGoodyChoice);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseGoodyChoice::ID, CIV_HOOK_AFTER, (void*)&AfterCvDllNetMessageHandler_ResponseGoodyChoice);host->RegisterHook(host->pluginIndex, CivHooks::CvDllNetMessageHandler_ResponseGoodyChoice::ID, CIV_HOOK_REPLACE, (void*)&ReplaceCvDllNetMessageHandler_ResponseGoodyChoice);

Code

800void CvDllNetMessageHandler::ResponseGoodyChoice(PlayerTypes ePlayer, int iPlotX, int iPlotY, GoodyTypes eGoody, int iUnitID)801{802	CvPlayerAI& kPlayer = GET_PLAYER(ePlayer);803	CvPlot* pPlot = GC.getMap().plot(iPlotX, iPlotY);804	CvUnit* pUnit = kPlayer.getUnit(iUnitID);805	kPlayer.receiveGoody(pPlot, eGoody, pUnit);806}

Calls