applyRank( Socket, Item, Rank );
bool makeItem( UOXSOCKET Socket, QDomElement& Action ){	// Things we need to do in this "node":	// Calculate a Rank for the created item	// do that not if we dont find a skill in the parent node	// or if rank="no" is set	bool doRanking = true;	bool foundSkill = false;	P_CHAR Character = currchar[ Socket ];	if( Character == NULL )		return false;	// Search for the first skill-node	QDomNodeList NodeList = Action.parentNode().childNodes();	UI08 Rank = 7;	for( UI32 i = 0; i < NodeList.count(); i++ )	{		if( ( !NodeList.item( i ).isElement() ) && ( NodeList.item( i ).nodeName() != "checkskill" ) )			continue;		if( !Action.attributes().contains( "id" ) )			continue;		UI08 Skill = Action.attributeNode( "id" ).nodeValue().toUShort();				UI16 MinSkill = 0;		UI16 MaxSkill = 1000;		if( Action.attributes().contains( "min" ) )			MinSkill = Action.attributeNode( "min" ).nodeValue().toULong();		if( Action.attributes().contains( "max" ) )			MaxSkill = Action.attributeNode( "max" ).nodeValue().toULong();		Rank = calcRank( Character, Skill, MinSkill, MaxSkill );		break;	}	// Create the item in the users backpack	QString ItemID = Action.attributeNode( "id" ).nodeValue();	P_ITEM Item = Items->SpawnItemBackpack2( Socket, ItemID, false );	applyRank( Socket, Item, Rank );	sysmessage( Socket, "You put the item in your backpack." );	// 0x58	if( Character )		Character->soundEffect( 0x57 );	return true;}