Bazaar developer reference

CvLuaGame::lGetDiploResponse(lua_State *)

Defined in
Lua/CvLuaGame.cpp, line 713
Class
CvLuaGame
Hook name
CivHooks::CvLuaGame_lGetDiploResponse

Hooks

static bool BeforeCvLuaGame_lGetDiploResponse(lua_State* L, int& result);static void AfterCvLuaGame_lGetDiploResponse(lua_State* L, int& result);static int ReplaceCvLuaGame_lGetDiploResponse(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lGetDiploResponse>(host, &BeforeCvLuaGame_lGetDiploResponse);CivRegisterAfter<CivHooks::CvLuaGame_lGetDiploResponse>(host, &AfterCvLuaGame_lGetDiploResponse);CivRegisterReplace<CivHooks::CvLuaGame_lGetDiploResponse>(host, &ReplaceCvLuaGame_lGetDiploResponse);

Code

712//string GetDiploResponse(leaderType, responseType)713int CvLuaGame::lGetDiploResponse(lua_State* L)714{715	CvGame& game = GC.getGame();716	const char* szLeaderType = luaL_checkstring(L, 1);717	const char* szResponseType = luaL_checkstring(L, 2);718719	Localization::String response720		= game.GetDiploResponse(szLeaderType, szResponseType, Localization::String::Empty, Localization::String::Empty);721722	lua_pushstring(L, response.toUTF8());723724	return 1;725}

Calls

Called by