CvLuaPlayer::lChangeMinorCivFriendshipWithMajor(lua_State *)
- Defined in
- Lua/CvLuaPlayer.cpp, line 6517
- Class
- CvLuaPlayer
- Hook name
CivHooks::CvLuaPlayer_lChangeMinorCivFriendshipWithMajor
Hooks
static bool BeforeCvLuaPlayer_lChangeMinorCivFriendshipWithMajor(lua_State* L, int& result);static void AfterCvLuaPlayer_lChangeMinorCivFriendshipWithMajor(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lChangeMinorCivFriendshipWithMajor(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lChangeMinorCivFriendshipWithMajor>(host, &BeforeCvLuaPlayer_lChangeMinorCivFriendshipWithMajor);CivRegisterAfter<CivHooks::CvLuaPlayer_lChangeMinorCivFriendshipWithMajor>(host, &AfterCvLuaPlayer_lChangeMinorCivFriendshipWithMajor);CivRegisterReplace<CivHooks::CvLuaPlayer_lChangeMinorCivFriendshipWithMajor>(host, &ReplaceCvLuaPlayer_lChangeMinorCivFriendshipWithMajor);
Code
6516//void ChangeMinorCivFriendshipWithMajor(PlayerTypes ePlayer, int iChange);6517int CvLuaPlayer::lChangeMinorCivFriendshipWithMajor(lua_State* L)6518{6519 CvPlayerAI* pkPlayer = GetInstance(L);6520 PlayerTypes ePlayer = (PlayerTypes) lua_tointeger(L, 2);6521 int iChange = lua_tointeger(L, 3);65226523 pkPlayer->GetMinorCivAI()->ChangeFriendshipWithMajor(ePlayer, iChange);6524 return 1;6525}
Calls
CvLuaScopedInstance::GetInstance- CvMinorCivAI::ChangeFriendshipWithMajor(PlayerTypes, int, bool)
- CvPlayer::GetMinorCivAI() const
lua_tointeger