i = contsp[newHash].pointer[counter2];
i = calcItemFromSer(vecContainer[counter2]);
int GetBankCount( CHARACTER p, unsigned short itemid, unsigned short color ){	if( p < 0 || p > cmem )		return 0;	unsigned char cid1 = (char)(color>>8);	unsigned char cid2 = (char)(color%256);	SERIAL serial = chars[p].serial;	int serhash = serial%HASHMAX;	long int goldCount = 0;	int counter2 = 0;	int j, i, ci;	for( ci = 0; ci < ownsp[serhash].max; ci++ )	{		j = ownsp[serhash].pointer[ci];		if( j != -1 )		{			if( items[j].ownserial == serial && items[j].type == 1 && items[j].morex == 1 )			{				int newHash = ( items[j].serial%HASHMAX );				for( counter2 = 0; counter2 < contsp[newHash].max; counter2++ )				{					i = contsp[newHash].pointer[counter2];					if( i != -1 )					{						if( items[i].contserial == items[j].serial )						{							if( items[i].id() == itemid )							{								if( items[i].color1 == cid1 && items[i].color2 == cid2 )									goldCount += items[i].amount;							}						}					}				}			}		}	}	return goldCount;}