All pastes #75860 Raw Edit

Something

public cpp v1 · immutable
#75860 ·published 2006-06-30 17:39 UTC
rendered paste body
//setcrown - Sets the player's crown statusvoid player::setcrown(bool bSet, u32 expiretime){	//If we want to set the crown..	u32 me = m_base, arnbase = (**this).m_base;	if (bSet)	{	//Lets call the built-in crown set function		_asm		{			push [me]			mov ecx, [arnbase]			mov eax, 0x41C0C0			call eax		}				//Also, reset the crown time		_asm		{			mov eax, [expiretime]			test eax, eax			jnz specifiedtime			mov eax, 0x450604			mov eax, [eax]specifiedtime:			lea eax, dword ptr [eax+eax*4]			lea ecx, dword ptr [eax+eax*4]			shl ecx, 2			mov eax, [me]			mov dword ptr [eax+0xCFC], ecx		}	}	else	{	//Call the 'lose crown' function		_asm		{			push [me]			mov ecx, [arnbase]			mov eax, 0x41C040			call eax		}	}}