Hooks
static bool BeforeCvLuaLeague_lGetResolutionName(lua_State* L, int& result);static void AfterCvLuaLeague_lGetResolutionName(lua_State* L, int& result);static int ReplaceCvLuaLeague_lGetResolutionName(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaLeague_lGetResolutionName>(host, &BeforeCvLuaLeague_lGetResolutionName);CivRegisterAfter<CivHooks::CvLuaLeague_lGetResolutionName>(host, &AfterCvLuaLeague_lGetResolutionName);CivRegisterReplace<CivHooks::CvLuaLeague_lGetResolutionName>(host, &ReplaceCvLuaLeague_lGetResolutionName);
Code
723//string GetResolutionName(ResolutionTypes eResolution, int iResolutionID, int iProposerChoice, bool bIncludePrefix);724int CvLuaLeague::lGetResolutionName(lua_State* L)725{726 CvLeague* pLeague = GetInstance(L);727 const ResolutionTypes eResolution = (ResolutionTypes) lua_tointeger(L, 2);728 const int iResolutionID = lua_tointeger(L, 3);729 const int iProposerChoice = lua_tointeger(L, 4);730 const bool bIncludePrefix = lua_toboolean(L, 5);731732 CvString sValue = pLeague->GetResolutionName(eResolution, iResolutionID, iProposerChoice, bIncludePrefix);733 lua_pushstring(L, sValue.c_str());734 return 1;735}