for (a=0;a<contsp[chars[i].serial%HASHMAX].max;a++)
vector<SERIAL> vecContainer = contsp.getData(chars[i].serial); for ( a = 0; a < vecContainer.size(); a++ )
void restockNPC(unsigned int currenttime, int i){	int a, b, c, ci;	if (SrvParms->shoprestock==1 && (shoprestocktime<=currenttime || overflow))	{		for (a=0;a<contsp[chars[i].serial%HASHMAX].max;a++)		{			ci=contsp[chars[i].serial%HASHMAX].pointer[a];			if (ci!=-1)			{				const PC_ITEM pici=MAKE_ITEMREF_LR(ci);	// on error return				if(pici->layer==0x1A && chars[i].shop==1) //morrolan item restock fix				{					for (b=0;b<contsp[pici->serial%HASHMAX].max;b++)					{						c=contsp[pici->serial%HASHMAX].pointer[b];						if (c!=-1)						{							const P_ITEM pic=MAKE_ITEMREF_LR(c);	// on error return							if (pic->restock)							{								int tmp=min(pic->restock, (pic->restock/2)+1);								pic->amount += tmp;								pic->restock -= tmp;							}							// MAgius(CHE): All items in shopkeeper need a new randomvaluerate.							if (SrvParms->trade_system==1)								StoreItemRandomValue(c,calcRegionFromXY(chars[i].pos.x,chars[i].pos.y));// Magius(CHE) (2)						}					}// for b				}			}		}//for a	}//if time}