if( ((pCont->id()&0xFF00) >> 8) == 0x3E ) bpopen[6]=0x4C;
void backpack(UOXSOCKET s, SERIAL serial) // Send Backpack (with items){	int count=0;	unsigned char bpopen[13]="\x24\x40\x0B\x00\x1A\x00\x3C\x3C\x00\x05\x00\x00";	if(serial==INVALID_SERIAL) return;	P_ITEM pCont=FindItemBySerial(serial);	if (!pCont)	{		LogErrorVar("backpack() couldn't find backpack: %d.",serial);		return;	}	int loopexit=0;	vector<SERIAL> vecContainer = contsp.getData(serial);	count = vecContainer.size();	bpopen[10]=count>>8;	bpopen[11]=count%256;	count=(count*19)+5;	bpopen[8]=count>>8;	bpopen[9]=count%256;	LongToCharPtr(serial, &bpopen[1]);	bpopen[5]=0x00;	bpopen[6]=0x47;	// Lil' rewrite, LB 10'th Okt 2000	switch(pCont->id1)	{		case 0x0E:			switch (pCont->id2)			{				case 0x75:					// Backpack				case 0x79: bpopen[6]=0x3C;	// Box/Pouch							break;				case 0x76: bpopen[6]=0x3D;	// Leather Bag							break;				case 0x77:					// Barrel				case 0x7A:					// Square Basket				case 0x7F: bpopen[6]=0x3E;	// Keg							break;				case 0x7C: bpopen[6]=0x4A;	// Silver Chest							break;				case 0x7D: bpopen[6]=0x43;	// Wooden Box							break;				case 0x3D:					// Large Wooden Crate				case 0x3C:					// Large Wooden Crate				case 0x3F:					// Small Wooden Crate				case 0x3E:					// Small Wooden Crate				case 0x7E: bpopen[6]=0x44;	// Wooden Crate							break;				case 0x80: bpopen[6]=0x4B;	// Brass Box							break;				case 0x40:					// Metal & Gold Chest				case 0x41: bpopen[6]=0x42;	// Metal & Gold Chest							break;				case 0x43:					// Wooden & Gold chest				case 0x42: bpopen[6]=0x49; // Wooden & Gold Chest							break;			}			break;		case 0x09:			switch (pCont->id2)			{				case 0x90: bpopen[6]=0x41; // Round Basket							break;				case 0xB2: bpopen[6]=0x3C; // Backpack 2							break;				case 0xAA: bpopen[6]=0x43; // Wooden Box							break;				case 0xA8: bpopen[6]=0x40; // Metal Box							break;				case 0xAB: bpopen[6]=0x4A; // Metal/Silver Chest							break;				case 0xA9: bpopen[6]=0x44; // Small Wooden Crate							break;			}			break;		case 0x20:			if (pCont->id2=='\x06') bpopen[6]=0x09; // Coffin			break;		case 0x0A:			switch (pCont->id2)			{				case 0x97:					// Bookcase				case 0x98:					// Bookcase				case 0x99:					// Bookcase				case 0x9a:					// Bookcase				case 0x9b:					// Bookcase				case 0x9c:					// Bookcase				case 0x9d:					// Bookcase				case 0x9e:	bpopen[6]=0x4d; // Bookcase							break;				case 0x4d:					// Fancy Armoire				case 0x51:					// Fancy Armoire				case 0x4c:					// Fancy Armoire				case 0x50:	bpopen[6]=0x4e; // Fancy Armoire							break;				case 0x4f:					// Wooden Armoire				case 0x53:					// Wooden Armoire				case 0x4e:					// Wooden Armoire				case 0x52:	bpopen[6]=0x4f; // Wooden Armoire							break;				case 0x30:					// chest of drawers (fancy)				case 0x38:	bpopen[6]=0x48; // chest of drawers (fancy)							break;				case 0x2c:					// chest of drawers (wood)				case 0x34:					// chest of drawers (wood)				case 0x3c:					// Dresser				case 0x3d:					// Dresser				case 0x44:					// Dresser				case 0x35:	bpopen[6]=0x51; // Dresser							break;				case 0xb2:	if (pCont->morex==1) bpopen[6]=0x4a;							break;			}			break;		case 0x3e:			 bpopen[6]=0x4C;			 break;		default:			break;	}	/*if ((pi->id1=='\x0E')&&(pi->id2=='\x75')) bpopen[6]=0x3C; // Backpack	if ((pi->id1=='\x0E')&&(pi->id2=='\x76')) bpopen[6]=0x3D; // Leather Bag	if ((pi->id1=='\x0E')&&(pi->id2=='\x77')) bpopen[6]=0x3E; // Barrel	if ((pi->id1=='\x09')&&(pi->id2=='\x90')) bpopen[6]=0x41; // Round Basket	if ((pi->id1=='\x0E')&&(pi->id2=='\x79')) bpopen[6]=0x3C; // Box/Pouch	if ((pi->id1=='\x0E')&&(pi->id2=='\x7A')) bpopen[6]=0x3F; // Square Basket	if ((pi->id1=='\x0E')&&(pi->id2=='\x7C')) bpopen[6]=0x4A; // Silver Chest	if ((pi->id1=='\x0E')&&(pi->id2=='\x7D')) bpopen[6]=0x43; // Wooden Box	if ((pi->id1=='\x0E')&&(pi->id2=='\x7E')) bpopen[6]=0x44; // Wooden Crate	if ((pi->id1=='\x0E')&&(pi->id2=='\x7F')) bpopen[6]=0x3E; // Keg	if ((pi->id1=='\x0E')&&(pi->id2=='\x80')) bpopen[6]=0x4B; // Brass Box	if ((pi->id1=='\x20')&&(pi->id2=='\x06')) bpopen[6]=0x09; // Coffin	// Misc. Containers	if ((pi->id1=='\x09')&&(pi->id2=='\xB2')) bpopen[6]=0x3C; // Backpack 2	if ((pi->id1=='\x09')&&(pi->id2=='\xAA')) bpopen[6]=0x3F; // Wooden Box	if ((pi->id1=='\x09')&&(pi->id2=='\xA8')) bpopen[6]=0x40; // Metal Box	if ((pi->id1=='\x09')&&(pi->id2=='\xAB')) bpopen[6]=0x4A; // Metal/Silver Chest	if ((pi->id1=='\x0E')&&(pi->id2=='\x40')) bpopen[6]=0x42; // Metal & Gold Chest	if ((pi->id1=='\x0E')&&(pi->id2=='\x41')) bpopen[6]=0x42; // Metal & Gold Chest	if ((pi->id1=='\x09')&&(pi->id2=='\xA9')) bpopen[6]=0x44; // Small Wooden Crate	if ((pi->id1=='\x0E')&&(pi->id2=='\x3E')) bpopen[6]=0x44; // Small Wooden Crate	if ((pi->id1=='\x0E')&&(pi->id2=='\x3F')) bpopen[6]=0x44; // Small Wooden Crate	if ((pi->id1=='\x0E')&&(pi->id2=='\x3C')) bpopen[6]=0x44; // Large Wooden Crate	if ((pi->id1=='\x0E')&&(pi->id2=='\x3D')) bpopen[6]=0x44; // Large Wooden Crate	// Bookcases	if ((pi->id1=='\x0A')&&(pi->id2=='\x97')) bpopen[6]=0x4D; // Bookcase	if ((pi->id1=='\x0A')&&(pi->id2=='\x98')) bpopen[6]=0x4D; // Bookcase	if ((pi->id1=='\x0A')&&(pi->id2=='\x99')) bpopen[6]=0x4D; // Bookcase	if ((pi->id1=='\x0A')&&(pi->id2=='\x9A')) bpopen[6]=0x4D; // Bookcase	if ((pi->id1=='\x0A')&&(pi->id2=='\x9B')) bpopen[6]=0x4D; // Bookcase	if ((pi->id1=='\x0A')&&(pi->id2=='\x9C')) bpopen[6]=0x4D; // Bookcase	// Armoires	if ((pi->id1=='\x0A')&&(pi->id2=='\x4D')) bpopen[6]=0x4E; // Fancy Armoire	if ((pi->id1=='\x0A')&&(pi->id2=='\x51')) bpopen[6]=0x4E; // Fancy Armoire	if ((pi->id1=='\x0A')&&(pi->id2=='\x4F')) bpopen[6]=0x4F; // Wooden Armoire	if ((pi->id1=='\x0A')&&(pi->id2=='\x53')) bpopen[6]=0x4F; // Wooden Armoire	// Open Armoires	// Hey, who knows - you might use these sometime	if ((pi->id1=='\x0A')&&(pi->id2=='\x4C')) bpopen[6]=0x4E; // Fancy Armoire (open)	if ((pi->id1=='\x0A')&&(pi->id2=='\x50')) bpopen[6]=0x4E; // Fancy Armoire (open)	if ((pi->id1=='\x0A')&&(pi->id2=='\x4E')) bpopen[6]=0x4F; // Wooden Armoire (open)	if ((pi->id1=='\x0A')&&(pi->id2=='\x52')) bpopen[6]=0x4F; // Wooden Armoire (open)	// Chest Drawers	if ((pi->id1=='\x0A')&&(pi->id2=='\x30')) bpopen[6]=0x48; // chest of drawers (fancy)	if ((pi->id1=='\x0A')&&(pi->id2=='\x38')) bpopen[6]=0x48; // chest of drawers (fancy)	if ((pi->id1=='\x0A')&&(pi->id2=='\x2C')) bpopen[6]=0x51; // chest of drawers (wood)	if ((pi->id1=='\x0A')&&(pi->id2=='\x34')) bpopen[6]=0x51; // chest of drawers (wood)	// Dressers	if ((pi->id1=='\x0A')&&(pi->id2=='\x3C')) bpopen[6]=0x51; // Dresser	if ((pi->id1=='\x0A')&&(pi->id2=='\x3D')) bpopen[6]=0x51; // Dresser	if ((pi->id1=='\x0A')&&(pi->id2=='\x44')) bpopen[6]=0x51; // Dresser	if ((pi->id1=='\x0A')&&(pi->id2=='\x35')) bpopen[6]=0x51; // Dresser	// Wooden Chests	if ((pi->id1=='\x0E')&&(pi->id2=='\x42')) bpopen[6]=0x49; // Wooden & Gold Chest	if ((pi->id1=='\x0E')&&(pi->id2=='\x43')) bpopen[6]=0x49; // Wooden & Gold Chest	// Bank box	if ((pi->id1=='\x09')&&(pi->id2=='\xB2') && pi->morex==1) bpopen[6]=0x4A; // Bank box	if (pi->id1==0x3E) bpopen[6]=0x4C;//Hold //Boats*/	Xsend(s, bpopen, 12);	unsigned int ci = 0;	loopexit=0;	P_ITEM pi;	for (ci = 0; ci < vecContainer.size(); ci++)	{		pi = FindItemBySerial(vecContainer[ci]);		if (pi == NULL)			continue;		//fix location of items if they mess up. (needs tweaked for container types)		if (pi->pos.x>150) pi->pos.x=150;		if (pi->pos.y>140) pi->pos.y=140;		//end fix		LongToCharPtr(pi->serial, &bpitem[0]);		ShortToCharPtr(pi->id(),bpitem+4);		bpitem[7]=pi->amount>>8;		bpitem[8]=pi->amount%256;		bpitem[9]=pi->pos.x>>8;		bpitem[10]=pi->pos.x%256;		bpitem[11]=pi->pos.y>>8;		bpitem[12]=pi->pos.y%256;		LongToCharPtr(serial, &bpitem[13]);		ShortToCharPtr(pi->color, &bpitem[17]);		bpitem[19]=pi->decaytime=0;//HoneyJar // reseting the decaytimer in the backpack		Xsend(s, bpitem, 19);	}}