Bazaar developer reference

CvLuaPlayer::lGetMinorCivFriendshipWithMajor(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 6506
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lGetMinorCivFriendshipWithMajor

Hooks

static bool BeforeCvLuaPlayer_lGetMinorCivFriendshipWithMajor(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetMinorCivFriendshipWithMajor(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetMinorCivFriendshipWithMajor(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetMinorCivFriendshipWithMajor>(host, &BeforeCvLuaPlayer_lGetMinorCivFriendshipWithMajor);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetMinorCivFriendshipWithMajor>(host, &AfterCvLuaPlayer_lGetMinorCivFriendshipWithMajor);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetMinorCivFriendshipWithMajor>(host, &ReplaceCvLuaPlayer_lGetMinorCivFriendshipWithMajor);

Code

6506int CvLuaPlayer::lGetMinorCivFriendshipWithMajor(lua_State* L)6507{6508	CvPlayerAI* pkPlayer = GetInstance(L);6509	const PlayerTypes ePlayer = (PlayerTypes) lua_tointeger(L, 2);65106511	const int iResult = pkPlayer->GetMinorCivAI()->GetEffectiveFriendshipWithMajor(ePlayer);6512	lua_pushinteger(L, iResult);6513	return 1;6514}

Calls

Called by