cChar::ContainerContent container(pc_currchar->content()); cChar::ContainerContent::const_iterator it (container.begin()); cChar::ContainerContent::const_iterator end(container.end());
cPlayer::ItemContainer container(pc_currchar->content()); cPlayer::ItemContainer::const_iterator it (container.begin()); cPlayer::ItemContainer::const_iterator end(container.end());
void usehairdye(cUOSocket* socket, P_ITEM piDye){	if (piDye == NULL)		return;	P_ITEM pi;	P_CHAR pc_currchar = socket->player();	cChar::ContainerContent container(pc_currchar->content());	cChar::ContainerContent::const_iterator it (container.begin());	cChar::ContainerContent::const_iterator end(container.end());	for (; it != end; ++it )	{		pi = *it;		if(pi->layer()==0x10 || pi->layer()==0x0B)//beard(0x10) and hair		{			pi->setColor( piDye->color() );	//Now change the color to the hair dye bottle color!			pi->update();		}	}	Items->DeleItem(piDye);	//Now delete the hair dye bottle!}