for (ci=0;ci<contsp[serhash].max;ci++)
vector<SERIAL> vecContainer = contsp.getData(serial); for ( ci = 0; ci < vecContainer.size(); ci++)
void endtrade(int b1, int b2, int b3, int b4){	int cont1, cont2, p1, p2, bp1, bp2, s1, s2, i;	int serial,serhash,ci;	unsigned char msg[30];	cont1=calcItemFromSer(b1, b2, b3, b4);	if (cont1<0) return; // LB, crashfix	cont2=calcItemFromSer(items[cont1].moreb1, items[cont1].moreb2, items[cont1].moreb3, items[cont1].moreb4);	if (cont2<0) return; // LB, crashfix	p1=calcCharFromSer(items[cont1].contserial);	p2=calcCharFromSer(items[cont2].contserial);	bp1=packitem(p1);	if (bp1<0) return;	bp2=packitem(p2);	if (bp2<0) return;	s1=calcSocketFromChar(p1);	s2=calcSocketFromChar(p2);	msg[0]=0x6F;//Header Byte	msg[1]=0x00;//Size	msg[2]=0x11;//Size	msg[3]=0x01;//State byte	LongToCharPtr(items[cont1].serial,msg+4);	msg[8]=0;	msg[9]=0;	msg[10]=0;	msg[11]=0;	msg[12]=0;	msg[13]=0;	msg[14]=0;	msg[15]=0;	msg[16]=0;	if (s1 > -1)	// player may have been disconnected (Duke)		Xsend(s1, msg, 17);	msg[0]=0x6F;//Header Byte	msg[1]=0x00;//Size	msg[2]=0x11;//Size	msg[3]=0x01;//State byte	LongToCharPtr(items[cont2].serial,msg+4);	msg[8]=0;	msg[9]=0;	msg[10]=0;	msg[11]=0;	msg[12]=0;	msg[13]=0;	msg[14]=0;	msg[15]=0;	msg[16]=0;	if (s2 > -1)	// player may have been disconnected (Duke)		Xsend(s2, msg, 17);	serial=items[cont1].serial;	serhash=serial%HASHMAX;	for (ci=0;ci<contsp[serhash].max;ci++)	{		i=contsp[serhash].pointer[ci];		if (i!=-1)			if ((items[i].contserial==serial))			{				if (items[i].glow>0) removefromptr(&glowsp[chars[currchar[s2]].serial%HASHMAX],i); // lb, glowing stuff				items[i].SetContSerial(items[bp1].serial);				if (items[i].glow>0) setptr(&glowsp[chars[currchar[s1]].serial%HASHMAX],i);				items[i].pos.x = RandomNum(50, 130);				items[i].pos.y = RandomNum(50, 130);				items[i].pos.z=9;				if (s1!=-1)					RefreshItem(i);//AntiChrist			}	}	serial=items[cont2].serial;	serhash=serial%HASHMAX;	for (ci=0;ci<contsp[serhash].max;ci++)	{		i=contsp[serhash].pointer[ci];		if (i!=-1)			if ((items[i].contserial==serial))			{				if (items[i].glow>0) removefromptr(&glowsp[chars[currchar[s2]].serial%HASHMAX],i); // lb, glowing stuff				items[i].SetContSerial(items[bp2].serial);				if (items[i].glow>0) setptr(&glowsp[chars[currchar[s1]].serial%HASHMAX],i);				items[i].pos.x=50+(rand()%80);				items[i].pos.y=50+(rand()%80);				items[i].pos.z=9;				if (s2!=-1)					RefreshItem(i);//AntiChrist			}	}	Items->DeleItem(cont1);	Items->DeleItem(cont2);}