Bazaar developer reference

CvLuaPlayer::lGetMinorCivFriendshipLevelWithMajor(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 6593
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor

Hooks

static bool BeforeCvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor>(host, &BeforeCvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor>(host, &AfterCvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor>(host, &ReplaceCvLuaPlayer_lGetMinorCivFriendshipLevelWithMajor);

Code

6593int CvLuaPlayer::lGetMinorCivFriendshipLevelWithMajor(lua_State* L)6594{6595	CvPlayerAI* pkPlayer = GetInstance(L);6596	const PlayerTypes ePlayer = (PlayerTypes) lua_tointeger(L, 2);65976598	const int iResult = pkPlayer->GetMinorCivAI()->GetFriendshipLevelWithMajor(ePlayer);6599	lua_pushinteger(L, iResult);6600	return 1;6601}

Calls

Called by