if (pi->id1<0x40)
if( !pi->isMulti() )
void senditem(UOXSOCKET s, P_ITEM pi) // Send items (on ground){	int pack,serial;	unsigned char itmput[21]="\x1A\x00\x13\x40\x01\x02\x03\x20\x42\x00\x32\x06\x06\x06\x4A\x0A\x00\x00\x00";	P_CHAR pc_currchar = currchar[s];	if ( pi->visible>=1 && !(pc_currchar->isGM()) )	return;	// meaning of the item's attribute visible	// Visible 0 -> visible to everyone	// Visible 1 -> only visible to owner and gm's (for owners normal for gm's grayish/hidden color)	// visible 2 -> only visble to gm's (greyish/hidden color)	if ( pi->visible>=2 && !(pc_currchar->isGM()) ) return; // workaround for missing gm-check client side for visibity since client 1.26.2	if (!pi->isInWorld())	{		pack=1;		if (isCharSerial(pi->contserial))		{			serial=pi->contserial;			P_CHAR pc = FindCharBySerial(serial);			if ( pc == NULL ) return;			if ( pc->serial == serial ) 				pack = 0;		}		if (pack)		{			if (pi->id1<0x40) // LB client crashfix, dont show multis in BP								// we should better move it out of pack, but thats								// only a first bannaid			{				sendbpitem(s, pi);				return;			}		}	}	if (pi->isInWorld() && inrange2(s,pi) )	{		LongToCharPtr(pi->serial | 0x80000000, &itmput[3]); // Enable Piles		//if player is a gm, this item		//is shown like a candle (so that he can move it),		//....if not, the item is a normal		//invisible light source!		if(pc_currchar->isGM() && pi->id()==0x1647)		{///let's show the lightsource like a candle			itmput[7]=0x0A;			itmput[8]=0x0F;		} else		{//else like a normal item			ShortToCharPtr(pi->id(),itmput+7);		}		itmput[9]=pi->amount>>8;		itmput[10]=pi->amount%256;		itmput[11]=pi->pos.x>>8;		itmput[12]=pi->pos.x%256;		itmput[13]=(pi->pos.y>>8)+0xC0; // Enable Dye and Move		itmput[14]=pi->pos.y%256;		itmput[15]=pi->pos.z;		if(pc_currchar->isGM() && pi->id()==0x1647)		{///let's show the lightsource like a blue item			itmput[16]=0;			itmput[17]=0xC6;		} else		{			ShortToCharPtr(pi->color, &itmput[16]);		}		itmput[18]=0;		int dontsendcandidate=0;		if (pi->visible==1)		{			if (!pc_currchar->Owns(pi))			{				dontsendcandidate=1;				itmput[18]|=0x80;			}		}		if (dontsendcandidate && !pc_currchar->isGM()) return; // LB 9-12-99, client 1.26.2 visibility correction		if (pi->visible==2)		{			itmput[18]|=0x80;		}		if (pi->isAllMovable()) itmput[18] |= 0x20;		if (pc_currchar->priv2&1) itmput[18] |= 0x20;		if ((pi->isOwnerMovable() || pi->isLockedDown()) && pc_currchar->Owns(pi))			itmput[18] |= 0x20;		if (pc_currchar->priv2&4)		{			if (pi->id()>=0x4000 && pi->id()<=0x40FF) // LB, 25-dec-1999 litle bugfix for treasure multis, ( == changed to >=)			{				itmput[7]=0x14;				itmput[8]=0xF0;			}		}		int dir=0;		if (pi->dir)		{			dir=1;			itmput[19]=itmput[18];			itmput[18]=itmput[17];			itmput[17]=itmput[16];			itmput[16]=itmput[15];			itmput[15]=pi->dir;			itmput[2]=0x14;			itmput[11]|=0x80;		}		itmput[2]=0x13+dir;		Xsend(s, itmput, 19+dir);		if (IsCorpse(pi->id()))		{			backpack2(s, pi->serial);		}	}}