Bazaar developer reference

CvLuaPlayer::lGetCommonFoeValue(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 8871
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lGetCommonFoeValue

Hooks

static bool BeforeCvLuaPlayer_lGetCommonFoeValue(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetCommonFoeValue(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetCommonFoeValue(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetCommonFoeValue>(host, &BeforeCvLuaPlayer_lGetCommonFoeValue);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetCommonFoeValue>(host, &AfterCvLuaPlayer_lGetCommonFoeValue);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetCommonFoeValue>(host, &ReplaceCvLuaPlayer_lGetCommonFoeValue);

Code

8871int CvLuaPlayer::lGetCommonFoeValue(lua_State* L)8872{8873	CvPlayerAI* pkPlayer = GetInstance(L);8874	PlayerTypes eOtherPlayer = (PlayerTypes) lua_tointeger(L, 2);88758876	const int iValue = pkPlayer->GetDiplomacyAI()->GetCommonFoeValue(eOtherPlayer);88778878	lua_pushinteger(L, iValue);8879	return 1;8880}

Calls

Called by