All pastes #838883 Raw Edit

Unnamed

public text v1 · immutable
#838883 ·published 2007-12-30 18:50 UTC
rendered paste body
void CUser::UseItemDirect(CItem *i)
{
	//0080E160  User::UseItem(CItem*) 
	typedef void (__thiscall*t)(CUser*, CItem*);
	t f = (t)ADR_USEITEM;
	f(this, i);
}

void CUser::UseItem(u32 id)
{
	typedef CItem *(__thiscall*t)(u64*, u32);
	t f = (t)ADR_GETFIRSTITEMBYID;
	CItem *i = f((u64*)((u64)this + 0x5A0), id);
	if(i!=)
		UseItemDirect(i);
}