#include "GameActorValues.h"
#include "Utilities.h"

float ActorValues::GetAV(UInt32 avCode)
{
	float result = 0;
	ThisStdCall(0x0065CB80, this, avCode);
	__asm { fstp [result] }
	return result;
}

void ActorValues::ModAV(UInt32 avCode, float modBy, bool bAllowPositive)
{
	ThisStdCall(0x0065CA60, this, avCode, modBy, bAllowPositive);
}

float GetLuckModifiedSkill(UInt32 skill, UInt32 luck)
{
	typedef float (* _fn)(UInt32 skill, UInt32 luck);
#if OBLIVION_VERSION == OBLIVION_VERSION_1_2_416
	static _fn fn = (_fn)0x00547B90;
#else
#error unsupported Oblivion version
#endif

	return fn(skill, luck);
}