Bazaar developer reference

CvLuaPlayer::lGetMinorCivFriendshipAnchorWithMajor(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 6528
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor

Hooks

static bool BeforeCvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor>(host, &BeforeCvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor>(host, &AfterCvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor>(host, &ReplaceCvLuaPlayer_lGetMinorCivFriendshipAnchorWithMajor);

Code

6527//void GetMinorCivFriendshipAnchorWithMajor(PlayerTypes eMajor);6528int CvLuaPlayer::lGetMinorCivFriendshipAnchorWithMajor(lua_State* L)6529{6530	CvPlayerAI* pkPlayer = GetInstance(L);6531	PlayerTypes eMajor = (PlayerTypes) lua_tointeger(L, 2);65326533	const int iResult = pkPlayer->GetMinorCivAI()->GetFriendshipAnchorWithMajor(eMajor);6534	lua_pushinteger(L, iResult);6535	return 1;6536}

Calls

Called by