CvLuaPlayer::lChangeFreePromotionCount(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 10137
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lChangeFreePromotionCount
Hooks
static bool BeforeCvLuaPlayer_lChangeFreePromotionCount(lua_State* L, int& result);static void AfterCvLuaPlayer_lChangeFreePromotionCount(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lChangeFreePromotionCount(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lChangeFreePromotionCount>(host, &BeforeCvLuaPlayer_lChangeFreePromotionCount);CivRegisterAfter<CivHooks::CvLuaPlayer_lChangeFreePromotionCount>(host, &AfterCvLuaPlayer_lChangeFreePromotionCount);CivRegisterReplace<CivHooks::CvLuaPlayer_lChangeFreePromotionCount>(host, &ReplaceCvLuaPlayer_lChangeFreePromotionCount);
Code
10136//void ChangeFreePromotionCount(PromotionTypes ePromotion, int iChange);10137int CvLuaPlayer::lChangeFreePromotionCount(lua_State* L)10138{10139 CvPlayerAI* pkPlayer = GetInstance(L);10140 int iPromotionIndex = lua_tointeger(L, 2);10141 const int iValue = lua_tointeger(L, 3);10142 pkPlayer->ChangeFreePromotionCount((PromotionTypes)iPromotionIndex, iValue);10143 return 1;10144}
Calls
CvLuaScopedInstance::GetInstance- CvPlayer::ChangeFreePromotionCount(PromotionTypes, int)
lua_tointeger