Bazaar developer reference

CvLuaPlayer::lGetFriendshipFromGoldGift(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 6811
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lGetFriendshipFromGoldGift

Hooks

static bool BeforeCvLuaPlayer_lGetFriendshipFromGoldGift(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetFriendshipFromGoldGift(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetFriendshipFromGoldGift(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetFriendshipFromGoldGift>(host, &BeforeCvLuaPlayer_lGetFriendshipFromGoldGift);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetFriendshipFromGoldGift>(host, &AfterCvLuaPlayer_lGetFriendshipFromGoldGift);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetFriendshipFromGoldGift>(host, &ReplaceCvLuaPlayer_lGetFriendshipFromGoldGift);

Code

6811int CvLuaPlayer::lGetFriendshipFromGoldGift(lua_State* L)6812{6813	CvPlayerAI* pkPlayer = GetInstance(L);6814	const PlayerTypes eMajor = (PlayerTypes) lua_tointeger(L, 2);6815	const int iGold = lua_tointeger(L, 3);68166817	const int iResult = pkPlayer->GetMinorCivAI()->GetFriendshipFromGoldGift(eMajor, iGold);6818	lua_pushinteger(L, iResult);6819	return 1;6820}

Calls

Called by