P_ITEM pPack=Packitem(currchar[s]); if (!pPack) return; int amt = QMAX(amount, 1);  pPack->DeleteAmount(amt,itemmake[s].Mat1id,itemmake[s].Mat1color); if (itemmake[s].Mat2id) pPack->DeleteAmount(amt,itemmake[s].Mat2id,itemmake[s].Mat2color);
P_ITEM pPack= Packitem(currchar[s]); if (pPack == NULL) return; amount=(amount>0 ? amount : 1); switch(ingottype) { case 1: pPack->DeleteAmount(amount, 0x1BF2, 0x0961); break; case 2: pPack->DeleteAmount(amount, 0x1BF2, 0x0466); break; case 3: pPack->DeleteAmount(amount, 0x1BF2, 0x0150); break; case 4: pPack->DeleteAmount(amount, 0x1BF2, 0x0386); break; case 5: pPack->DeleteAmount(amount, 0x1BF2, 0x0191); break; case 6: pPack->DeleteAmount(amount, 0x1BF2, 0x02E7); break; case 7: pPack->DeleteAmount(amount, 0x1BF2, 0x022F); break; case 8: pPack->DeleteAmount(amount, 0x1BF2, 0x02C3); break; case 9: pPack->DeleteAmount(amount, 0x1BF2, 0x046E); break; case 10:pPack->DeleteAmount(amount, 0x1BF2, 0x0000); break; } ingottype=0;
	virtual void deletematerial(SOCK s, int amount)	{		P_ITEM pPack=Packitem(currchar[s]);		if (!pPack) return;		int amt = QMAX(amount, 1);		pPack->DeleteAmount(amt,itemmake[s].Mat1id,itemmake[s].Mat1color);		if (itemmake[s].Mat2id)						// if a 2nd material is used, delete that too			pPack->DeleteAmount(amt,itemmake[s].Mat2id,itemmake[s].Mat2color);/*		delequan(currchar[s],itemmake[s].Mat1id,amount>0 ? amount : 1);		if (itemmake[s].Mat2id)												// if a 2nd material is used,			delequan(currchar[s],itemmake[s].Mat2id,amount>0 ? amount : 1);	// delete that too */	}