clConsole.send("\nALERT ! item %s [serial: %i] has dangerous container value, autocorrecting\n", pi->name().ascii(), pi->serial); pi->setContSerial(-1);
clConsole.send( "ALERT ! item %s [serial: %i] has dangerous container value, autocorrecting\n", pi->name().ascii(), pi->serial); pi->setContSerial( -1 );
void RefreshItem(P_ITEM pi)//Send this item to all online people in range{//check if item is in a pack or on the ground, then use different methods	unsigned int a;	signed int aa ;	if(pi == NULL) return; //just to be on the right side	if (pi->contserial==pi->serial)	{		clConsole.send("\nALERT ! item %s [serial: %i] has dangerous container value, autocorrecting\n", pi->name().ascii(), pi->serial);		pi->setContSerial(-1);	}	//first check: let's check if it's on the ground....	if(pi->isInWorld())	{//yeah, it's on ground!		for(a=0;a<(unsigned)now;a++)//send this item to all the sockets in range		{			if(perm[a] && iteminrange(a,  pi, VISRANGE))				senditem(a, pi);		}		return;	}	//if not, let's check if it's on a char or in a pack	if (isCharSerial(pi->contserial))//container is a player...it means it's equipped on a character!	{		LongToCharPtr(pi->serial,wearitem+1);		ShortToCharPtr(pi->id(),wearitem+5);		wearitem[8]=pi->layer();		LongToCharPtr(pi->contserial,wearitem+9);		ShortToCharPtr(pi->color(), wearitem+13);		P_CHAR charcont = FindCharBySerial(pi->contserial);		for(a=0;a<(unsigned)now;a++)//send this item to all the sockets in range		{			if(perm[a] && inrange1p(currchar[a], charcont))				Xsend(a, wearitem, 15);		}		return;	}	else//container is an item...it means we have to use sendbpitem()!!	{		for(aa=0;aa<now;aa++)//send this item to all the sockets in range		{			if(perm[aa])				sendbpitem(aa, pi);//NOTE: there's already the inrange check								 //in the sendbpitem() function, so it's unuseful								 //to do a double check!!		}		return;	}}