#include "C:\L\Markets\Market.h"
Market::Market()
{
	Reset();
}
void Market::Reset()
{
	TotalCash = 0;

	for(int i = 0; i < 4; i++)
		LockBox[i].Reset();
}
void Market::setCashLB(int index, int amount)
{
	//Make sure we're within range
	if(index >= 0 && index < 4)
	{
		//Make sure the value is a positive number
		if(amount >= 0)
		{
			//Set the amount
			LockBox[index].SetNumber(amount);

			//Adjust count to reflect set
			if		(index == 0)	{ TotalCash += (amount * 1000);	}
			else if	(index == 1)	{ TotalCash += (amount * 100);	}
			else if	(index == 2)	{ TotalCash += (amount * 10);	}
			else					{ TotalCash += (amount * 1);	}
		}
	}
}
void Market::addCashLB(int index, int amount)
{
	//Make sure we're in range
	if(index >= 0 && index < 4)
	{
		//Verify if it's a negative number that it doesn't go below zero
		if(LockBox[index].GetNumber() + amount > 0)
		{
			//Adjust current value
			LockBox[index].SetNumber(LockBox[index].GetNumber() + amount);

			//Adjust total value to reflect change
			if		(index == 0)	{ if(TotalCash + (amount * 1000) > 0)	TotalCash += (amount * 1000);	}
			else if	(index == 1)	{ if(TotalCash + (amount * 100)  > 0)	TotalCash += (amount * 100);	}
			else if	(index == 2)	{ if(TotalCash + (amount * 10)   > 0)	TotalCash += (amount * 10);		}
			else					{ if(TotalCash + (amount * 1)    > 0)	TotalCash += (amount * 1);		}
		}
	}
}
int	Market::getTotal()
{
	return TotalCash;
}
int	Market::getPlat()
{
	return LockBox[0].GetNumber();
}
int	Market::getGold()
{
	return LockBox[1].GetNumber();
}
int	Market::getSilv()
{
	return LockBox[2].GetNumber();
}
int	Market::getCopp()
{
	return LockBox[3].GetNumber();
}
void Market::adjustCashOnHand(int amount)
{
//	int tempP, tempG, tempS, tempC, Work;
//
//	//Reset all to zeros...
//	tempP = tempG = tempS = tempC = Work = 0;
//
//	tempP	= int(amount / 1000);																	//Platinum
//	Work	= amount - (tempP * 1000);									tempG	= int(Work / 100);	//Gold
//	Work	= amount - ((tempP * 1000) + (tempG * 100));				tempS	= int(Work / 10);	//Silver
//	Work	= amount - ((tempP * 1000) + (tempG * 100) + (tempS * 10));	tempC	= Work;				//Copper
//
//	//Adjust numbers
//	LockBox[0].SetNumber(LockBox[0].GetNumber() + tempP);
//	LockBox[1].SetNumber(LockBox[1].GetNumber() + tempG);
//	LockBox[2].SetNumber(LockBox[2].GetNumber() + tempS);
//	LockBox[3].SetNumber(LockBox[3].GetNumber() + tempC);
}
void Market::handOverCash(int howMuch, int &Plat, int &Gold, int &Silv, int &Copp)
{
	int tempP, tempG, tempS, tempC, Work;

	if(howMuch > TotalCash) 
	{
		Plat = 0; Gold = 0;
		Silv = 0; Copp = 0;
		return;
	}

	//Reset all to zeros...
	tempP = tempG = tempS = tempC = Work = 0;

	if		(howMuch > 1000)
	{
		tempP	= int(howMuch / 1000);								
		Work	= howMuch - (tempP * 1000);
		tempG	= int(Work / 100);												
		Work	= howMuch - ((tempP * 1000) + (tempG * 100));
		tempS	= int(Work / 10);												
		tempC	= howMuch - ((tempP * 1000) + (tempG * 100) + (tempS * 10));
	}
	else if	(howMuch > 100)
	{
		tempP	= 0;
		tempG	= int(howMuch / 100);												
		Work	= howMuch - (tempG * 100);
		tempS	= int(Work / 10);												
		tempC	= howMuch - ((tempG * 100) + (tempS * 10));
	}
	else if	(howMuch > 10)
	{
		tempP	= 0;
		tempG	= 0;
		tempS	= int(howMuch / 10);												
		tempC	= howMuch - (tempS * 10);
	}
	else
	{
		tempP	= 0;
		tempG	= 0;
		tempS	= 0;
		tempC	= howMuch;
	}
	if(tempP > 0)//See if we can dish out the number of Platinum
	{
		if(LockBox[0].GetNumber() > 0)
		{
			if(tempP <= LockBox[0].GetNumber())
			{
				LockBox[0].SetNumber(LockBox[0].GetNumber() - tempP);
				Plat = tempP;
				TotalCash -= (tempP * 1000);
			}
			else
			{
				Plat = LockBox[0].GetNumber();
				tempG += (tempP - LockBox[0].GetNumber()) * 10;

				TotalCash -= (LockBox[0].GetNumber() * 1000);
				LockBox[0].SetNumber(0);
			}
		}
		else tempG += (tempP * 10);
	}
	if(tempG > 0)
	{
		if(LockBox[1].GetNumber() > 0)
		{
			if(tempG <= LockBox[1].GetNumber())
			{
				LockBox[1].SetNumber(LockBox[1].GetNumber() - tempG);
				Gold = tempG;
				TotalCash -= (tempG * 100);
			}
			else
			{
				Gold = LockBox[1].GetNumber();
				tempS += (tempG - LockBox[1].GetNumber()) * 10;

				TotalCash -= (LockBox[1].GetNumber() * 100);
				LockBox[1].SetNumber(0);				
			}
		}
		else tempS += (tempG * 10);
	}
	if(tempS > 0)
	{
		if(LockBox[2].GetNumber() > 0)
		{
			if(tempS <= LockBox[2].GetNumber())
			{
				LockBox[2].SetNumber(LockBox[2].GetNumber() - tempS);
				Silv = tempS;
				TotalCash -= (tempS * 10);
			}
			else
			{
				Silv = LockBox[2].GetNumber();
				tempC += (tempS - LockBox[2].GetNumber()) * 10;

				TotalCash -= (LockBox[2].GetNumber() * 10);
				LockBox[2].SetNumber(0);
			}
		}
		else tempC += (tempS * 10);
	}
	if(tempC > 0)
	{
		if(LockBox[3].GetNumber() > 0)
		{
			if(tempC <= LockBox[3].GetNumber())
			{
				LockBox[3].SetNumber(LockBox[3].GetNumber() - tempC);
				Copp = tempC;
				TotalCash -= (tempC);
			}
			else cout << "Coinage got past Copper value (Market).\n";
		}
	}
}
//Inheriting Classes...
HomeMarket::HomeMarket()
{
	Reset();
}
void HomeMarket::Reset()
{
	numSlots = HomeMarketTotal;
	for(int i = 0; i < numSlots; i++) Stock[i].Reset();
}
void HomeMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < HomeMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int HomeMarket::getShelfItem(int index)
{
	if(index >= 0 && index < HomeMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void HomeMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < HomeMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int HomeMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < HomeMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
GuildMarket::GuildMarket()
{
	Reset();
}
void GuildMarket::Reset()
{
	numSlots = GuildMarketTotal;
	for(int i = 0; i < GuildMarketTotal; i++) Stock[i].Reset();
	Stock[0].SetWhat(itAnteMeat);	Stock[0].SetNumber(0);	Stock[1].SetWhat(itBearMeat);	Stock[1].SetNumber(0);
	Stock[2].SetWhat(itBeavMeat);	Stock[2].SetNumber(0);	Stock[3].SetWhat(itBirdMeat);	Stock[3].SetNumber(0);
	Stock[4].SetWhat(itBuffHide);	Stock[4].SetNumber(0);	Stock[5].SetWhat(itBuffMeat);	Stock[5].SetNumber(0);
	Stock[6].SetWhat(itCattMeat);	Stock[6].SetNumber(0);	Stock[7].SetWhat(itCrocMeat);	Stock[7].SetNumber(0);
	Stock[8].SetWhat(itDragHide);	Stock[8].SetNumber(0);	Stock[9].SetWhat(itErmiMeat);	Stock[9].SetNumber(0);
	Stock[10].SetWhat(itGoatMeat);	Stock[10].SetNumber(0);	Stock[11].SetWhat(itHorseMeat);	Stock[11].SetNumber(0);
}
void GuildMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < GuildMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int GuildMarket::getShelfItem(int index)
{
	if(index >= 0 && index < GuildMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void GuildMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < GuildMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int GuildMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < GuildMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
AlcheMarket::AlcheMarket()
{
	Reset();
}
void AlcheMarket::Reset()
{
	numSlots = AlcheMarketTotal;

	for(int i = 0; i < AlcheMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itAnteHorn);	Stock[0].SetNumber(0);	Stock[1].SetWhat(itBadgClaw);	Stock[1].SetNumber(0);
	Stock[2].SetWhat(itBasiClaw);	Stock[2].SetNumber(0);	Stock[3].SetWhat(itBasiTeet);	Stock[3].SetNumber(0);
	Stock[4].SetWhat(itBearClaw);	Stock[4].SetNumber(0);	Stock[5].SetWhat(itBeavTail);	Stock[5].SetNumber(0);
	Stock[6].SetWhat(itBirdBeak);	Stock[6].SetNumber(0);	Stock[7].SetWhat(itBirFeath);	Stock[7].SetNumber(0);
	Stock[8].SetWhat(itBuffHorn);	Stock[8].SetNumber(0);	Stock[9].SetWhat(itBugbHair);	Stock[9].SetNumber(0);
	Stock[10].SetWhat(itBugbEar);	Stock[10].SetNumber(0);	Stock[11].SetWhat(itCattHorn);	Stock[11].SetNumber(0);
	Stock[12].SetWhat(itCocFeath);	Stock[12].SetNumber(0);	Stock[13].SetWhat(itCockMeat);	Stock[13].SetNumber(0);
	Stock[14].SetWhat(itCockBeak);	Stock[14].SetNumber(0);	Stock[15].SetWhat(itCrocTeet);	Stock[15].SetNumber(0);
	Stock[16].SetWhat(itDogMeat);	Stock[16].SetNumber(0);	Stock[17].SetWhat(itDolpSnout);	Stock[17].SetNumber(0);
	Stock[18].SetWhat(itDolpMeat);	Stock[18].SetNumber(0);	Stock[19].SetWhat(itDragClaw);	Stock[19].SetNumber(0);
	Stock[20].SetWhat(itDragHide);	Stock[20].SetNumber(0);	Stock[21].SetWhat(itDragHorn);	Stock[21].SetNumber(0);
	Stock[22].SetWhat(itDragEye);	Stock[22].SetNumber(0);	Stock[23].SetWhat(itDryadHai);	Stock[23].SetNumber(0);
	Stock[24].SetWhat(itGargHide);	Stock[24].SetNumber(0);	Stock[25].SetWhat(itAirEssen);	Stock[25].SetNumber(0);
	Stock[26].SetWhat(itGianHair);	Stock[26].SetNumber(0);	Stock[27].SetWhat(itGianEar);	Stock[27].SetNumber(0);
	Stock[28].SetWhat(itGianHide);	Stock[28].SetNumber(0);	Stock[29].SetWhat(itGnomHair);	Stock[29].SetNumber(0);
	Stock[30].SetWhat(itGnomNose);	Stock[30].SetNumber(0);	Stock[31].SetWhat(itGoatHorn);	Stock[31].SetNumber(0);
	Stock[32].SetWhat(itGoblHair);	Stock[32].SetNumber(0);	Stock[33].SetWhat(itGoblEar);	Stock[33].SetNumber(0);
	Stock[34].SetWhat(itGremHide);	Stock[34].SetNumber(0);	Stock[35].SetWhat(itGremClaw);	Stock[35].SetNumber(0);
	Stock[36].SetWhat(itHarpFeath);	Stock[36].SetNumber(0);	Stock[37].SetWhat(itHarpyClaw);	Stock[37].SetNumber(0);
	Stock[38].SetWhat(itHobgoHair);	Stock[38].SetNumber(0);	Stock[39].SetWhat(itHobgoEar);	Stock[39].SetNumber(0);
	Stock[40].SetWhat(itHorseTail);	Stock[40].SetNumber(0);	Stock[41].SetWhat(itHumanHair);	Stock[41].SetNumber(0);
	Stock[42].SetWhat(itHumanEar);	Stock[42].SetNumber(0);	Stock[43].SetWhat(itHumanHead);	Stock[43].SetNumber(0);
	Stock[44].SetWhat(itHydraTail);	Stock[44].SetNumber(0);	Stock[45].SetWhat(itImpHide);	Stock[45].SetNumber(0);
	Stock[46].SetWhat(itImpWing);	Stock[46].SetNumber(0);	Stock[47].SetWhat(itLepreHair);	Stock[47].SetNumber(0);
	Stock[48].SetWhat(itMermaHair);	Stock[48].SetNumber(0);	Stock[49].SetWhat(itMinotHorn);	Stock[49].SetNumber(0);
	Stock[50].SetWhat(itMoleHide);	Stock[50].SetNumber(0);	Stock[51].SetWhat(itMouseHide);	Stock[51].SetNumber(0);
	Stock[52].SetWhat(itMouseTail);	Stock[52].SetNumber(0);	Stock[53].SetWhat(itNymphHair);	Stock[53].SetNumber(0);
	Stock[54].SetWhat(itNymphHear);	Stock[54].SetNumber(0);	Stock[55].SetWhat(itOgreHide);	Stock[55].SetNumber(0);
	Stock[56].SetWhat(itOgreHair);	Stock[56].SetNumber(0);	Stock[57].SetWhat(itOgreEar);	Stock[57].SetNumber(0);
	Stock[58].SetWhat(itOposHide);	Stock[58].SetNumber(0);	Stock[59].SetWhat(itPorcQuill);	Stock[59].SetNumber(0);
	Stock[60].SetWhat(itRatHide);	Stock[60].SetNumber(0);	Stock[61].SetWhat(itRatTail);	Stock[61].SetNumber(0);
	Stock[62].SetWhat(itScorpStin);	Stock[62].SetNumber(0);	Stock[63].SetWhat(itSirenHair);	Stock[63].SetNumber(0);
	Stock[64].SetWhat(itWaterSpir);	Stock[64].SetNumber(0);	Stock[65].SetWhat(itSkeleBone);	Stock[65].SetNumber(0);
	Stock[66].SetWhat(itSkunGland);	Stock[66].SetNumber(0);	Stock[67].SetWhat(itSnakeHide);	Stock[67].SetNumber(0);
	Stock[68].SetWhat(itSnakeFang);	Stock[68].SetNumber(0);	Stock[69].SetWhat(itSphinHide);	Stock[69].SetNumber(0);
	Stock[70].SetWhat(itSphinWing);	Stock[70].SetNumber(0);	Stock[71].SetWhat(itSphinTail);	Stock[71].SetNumber(0);
	Stock[72].SetWhat(itSpritHair);	Stock[72].SetNumber(0);	Stock[73].SetWhat(itSpriteEar);	Stock[73].SetNumber(0);
	Stock[74].SetWhat(itSpriteEye);	Stock[74].SetNumber(0);	Stock[75].SetWhat(itSquidTent);	Stock[75].SetNumber(0);
	Stock[76].SetWhat(itTitanHair);	Stock[76].SetNumber(0);	Stock[77].SetWhat(itTitanEye);	Stock[77].SetNumber(0);
	Stock[78].SetWhat(itTitanEar);	Stock[78].SetNumber(0);	Stock[79].SetWhat(itTitanArm);	Stock[79].SetNumber(0);
	Stock[80].SetWhat(itTitanLeg);	Stock[80].SetNumber(0);	Stock[81].SetWhat(itWStaHorn);	Stock[81].SetNumber(0);
	Stock[82].SetWhat(itWBoaTusk);	Stock[82].SetNumber(0);	Stock[83].SetWhat(itWolvClaw);	Stock[83].SetNumber(0);	
}
void AlcheMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < AlcheMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int AlcheMarket::getShelfItem(int index)
{
	if(index >= 0 && index < AlcheMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void AlcheMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < AlcheMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int AlcheMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < AlcheMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
BlackMarket::BlackMarket()
{
	Reset();
}
void BlackMarket::Reset()
{
	numSlots = BlackMarketTotal;

	for(int i = 0; i < BlackMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itRiLegs);		Stock[0].SetNumber(0);	Stock[1].SetWhat(itChLegs);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itScLegs);		Stock[2].SetNumber(0);	Stock[3].SetWhat(itBaLegs);		Stock[3].SetNumber(0);
	Stock[4].SetWhat(itLPLegs);		Stock[4].SetNumber(0);	Stock[5].SetWhat(itHPLegs);		Stock[5].SetNumber(0);
	Stock[6].SetWhat(itRiWst);		Stock[6].SetNumber(0);	Stock[7].SetWhat(itChWst);		Stock[7].SetNumber(0);
	Stock[8].SetWhat(itScWst);		Stock[8].SetNumber(0);	Stock[9].SetWhat(itBaWst);		Stock[9].SetNumber(0);
	Stock[10].SetWhat(itLPWst);		Stock[10].SetNumber(0);	Stock[11].SetWhat(itHPWst);		Stock[11].SetNumber(0);
	Stock[12].SetWhat(itRiChest);	Stock[12].SetNumber(0);	Stock[13].SetWhat(itChChest);	Stock[13].SetNumber(0);
	Stock[14].SetWhat(itScChest);	Stock[14].SetNumber(0);	Stock[15].SetWhat(itBaChest);	Stock[15].SetNumber(0);
	Stock[16].SetWhat(itLPChest);	Stock[16].SetNumber(0);	Stock[17].SetWhat(itHPChest);	Stock[17].SetNumber(0);
	Stock[18].SetWhat(itRiArms);	Stock[18].SetNumber(0);	Stock[19].SetWhat(itChArms);	Stock[19].SetNumber(0);
	Stock[20].SetWhat(itScArms);	Stock[20].SetNumber(0);	Stock[21].SetWhat(itBaArms);	Stock[21].SetNumber(0);
	Stock[22].SetWhat(itLPArms);	Stock[22].SetNumber(0);	Stock[23].SetWhat(itHPArms);	Stock[23].SetNumber(0);
	Stock[24].SetWhat(itChGlove);	Stock[24].SetNumber(0);	Stock[25].SetWhat(itLPGlove);	Stock[25].SetNumber(0);
	Stock[26].SetWhat(itHPGlove);	Stock[26].SetNumber(0);	Stock[27].SetWhat(itRiShoul);	Stock[27].SetNumber(0);
	Stock[28].SetWhat(itChShoul);	Stock[28].SetNumber(0);	Stock[29].SetWhat(itScShoul);	Stock[29].SetNumber(0);
	Stock[30].SetWhat(itBaShoul);	Stock[30].SetNumber(0);	Stock[31].SetWhat(itLPShoul);	Stock[31].SetNumber(0);
	Stock[32].SetWhat(itHPShoul);	Stock[32].SetNumber(0);	Stock[33].SetWhat(itRiNeck);	Stock[33].SetNumber(0);
	Stock[34].SetWhat(itChNeck);	Stock[34].SetNumber(0);	Stock[35].SetWhat(itBaNeck);	Stock[35].SetNumber(0);
	Stock[36].SetWhat(itLPNeck);	Stock[36].SetNumber(0);	Stock[37].SetWhat(itHPNeck);	Stock[37].SetNumber(0);
	Stock[38].SetWhat(itRiHead);	Stock[38].SetNumber(0);	Stock[39].SetWhat(itChHead);	Stock[39].SetNumber(0);
	Stock[40].SetWhat(itBaHead);	Stock[40].SetNumber(0);	Stock[41].SetWhat(itLPHead);	Stock[41].SetNumber(0);
	Stock[42].SetWhat(itHPHead);	Stock[42].SetNumber(0);	Stock[43].SetWhat(itDragClaw);	Stock[43].SetNumber(0);
	Stock[44].SetWhat(itDragHorn);	Stock[44].SetNumber(0);	Stock[45].SetWhat(itFireCoal);	Stock[45].SetNumber(0);
	Stock[46].SetWhat(itBastSw);	Stock[46].SetNumber(0);	Stock[47].SetWhat(itBattAxe);	Stock[47].SetNumber(0);
	Stock[48].SetWhat(itLgBow);		Stock[48].SetNumber(0);	Stock[49].SetWhat(itStBow);		Stock[49].SetNumber(0);
	Stock[50].SetWhat(itBrdSw);		Stock[50].SetNumber(0);	Stock[51].SetWhat(itClub);		Stock[51].SetNumber(0);
	Stock[52].SetWhat(itCLgBow);	Stock[52].SetNumber(0);	Stock[53].SetWhat(itCStBow);	Stock[53].SetNumber(0);
	Stock[54].SetWhat(itCBow);		Stock[54].SetNumber(0);	Stock[55].SetWhat(itDagger);	Stock[55].SetNumber(0);
	Stock[56].SetWhat(itFlail);		Stock[56].SetNumber(0);	Stock[57].SetWhat(itHandAxe);	Stock[57].SetNumber(0);
	Stock[58].SetWhat(itLance);		Stock[58].SetNumber(0);	Stock[59].SetWhat(itLgSw);		Stock[59].SetNumber(0);
	Stock[60].SetWhat(itMace);		Stock[60].SetNumber(0);	Stock[61].SetWhat(itMoStar);	Stock[61].SetNumber(0);
	Stock[62].SetWhat(itPick);		Stock[62].SetNumber(0);	Stock[63].SetWhat(itQrStaff);	Stock[63].SetNumber(0);
	Stock[64].SetWhat(itScim);		Stock[64].SetNumber(0);	Stock[65].SetWhat(itScourge);	Stock[65].SetNumber(0);
	Stock[66].SetWhat(itStSw);		Stock[66].SetNumber(0);	Stock[67].SetWhat(itSickle);	Stock[67].SetNumber(0);
	Stock[68].SetWhat(itSpear);		Stock[68].SetNumber(0);	Stock[69].SetWhat(itTrident);	Stock[69].SetNumber(0);
	Stock[70].SetWhat(itWarHam);	Stock[70].SetNumber(0);	Stock[71].SetWhat(itWhip);		Stock[71].SetNumber(0);
	Stock[72].SetWhat(itSWoSh);		Stock[72].SetNumber(0);	Stock[73].SetWhat(itMWoSh);		Stock[73].SetNumber(0);
	Stock[74].SetWhat(itLWoSh);		Stock[74].SetNumber(0);	Stock[75].SetWhat(itSMeSh);		Stock[75].SetNumber(0);
	Stock[76].SetWhat(itMMeSh);		Stock[76].SetNumber(0);	Stock[77].SetWhat(itLMeSh);		Stock[77].SetNumber(0);
}
void BlackMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < BlackMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int BlackMarket::getShelfItem(int index)
{
	if(index >= 0 && index < BlackMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void BlackMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < BlackMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int BlackMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < BlackMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
CandlMarket::CandlMarket()
{
	Reset();
}
void CandlMarket::Reset()
{
	numSlots = CandlMarketTotal;

	for(int i = 0; i < CandlMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itAnteMeat);		Stock[0].SetNumber(0);	Stock[1].SetWhat(itBadgMeat);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itBasiMeat);		Stock[2].SetNumber(0);	Stock[3].SetWhat(itBearMeat);		Stock[3].SetNumber(0);
	Stock[4].SetWhat(itBeavMeat);		Stock[4].SetNumber(0);	Stock[5].SetWhat(itBirdMeat);		Stock[5].SetNumber(0);
	Stock[6].SetWhat(itBuffMeat);		Stock[6].SetNumber(0);	Stock[7].SetWhat(itCattMeat);		Stock[7].SetNumber(0);
	Stock[8].SetWhat(itCrocMeat);		Stock[8].SetNumber(0);	Stock[9].SetWhat(itDolpMeat);		Stock[9].SetNumber(0);
	Stock[10].SetWhat(itErmiMeat);		Stock[10].SetNumber(0);	Stock[11].SetWhat(itGoatMeat);		Stock[11].SetNumber(0);
	Stock[12].SetWhat(itGophMea);		Stock[12].SetNumber(0);	Stock[13].SetWhat(itGoriMeat);		Stock[13].SetNumber(0);
	Stock[14].SetWhat(itHedgeMeat);		Stock[14].SetNumber(0);	Stock[15].SetWhat(itHorseMeat);		Stock[15].SetNumber(0);
	Stock[16].SetWhat(itMinkMeat);		Stock[16].SetNumber(0);	Stock[17].SetWhat(itOtteMeat);		Stock[17].SetNumber(0);
	Stock[18].SetWhat(itOttSeMeat);		Stock[18].SetNumber(0);	Stock[19].SetWhat(itPigDoMeat);		Stock[19].SetNumber(0);
	Stock[20].SetWhat(itPigWiMeat);		Stock[20].SetNumber(0);	Stock[21].SetWhat(itRaccoMeat);		Stock[21].SetNumber(0);
	Stock[22].SetWhat(itRabbiMeat);		Stock[22].SetNumber(0);	Stock[23].SetWhat(itRatMeat);		Stock[23].SetNumber(0);
	Stock[24].SetWhat(itSheepMeat);		Stock[24].SetNumber(0);	Stock[25].SetWhat(itSnakeMeat);		Stock[25].SetNumber(0);
	Stock[26].SetWhat(itSquirMeat);		Stock[26].SetNumber(0);	Stock[27].SetWhat(itSqFlyMeat);		Stock[27].SetNumber(0);
	Stock[28].SetWhat(itWartMeat);		Stock[28].SetNumber(0);	Stock[29].SetWhat(itWeasMeat);		Stock[29].SetNumber(0);
	Stock[30].SetWhat(itWBoaMeat);		Stock[30].SetNumber(0);	Stock[31].SetWhat(itWStaMeat);		Stock[31].SetNumber(0);
	Stock[32].SetWhat(itWdchMeat);		Stock[32].SetNumber(0);	Stock[33].SetWhat(itWolfMeat);		Stock[33].SetNumber(0);
	Stock[34].SetWhat(itWolvMeat);		Stock[34].SetNumber(0);
}
void CandlMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < CandlMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int CandlMarket::getShelfItem(int index)
{
	if(index >= 0 && index < CandlMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void CandlMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < CandlMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int CandlMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < CandlMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
CarpeMarket::CarpeMarket()
{
	Reset();
}
void CarpeMarket::Reset()
{
	numSlots = CarpeMarketTotal;

	for(int i = 0; i < CarpeMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void CarpeMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < CarpeMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int CarpeMarket::getShelfItem(int index)
{
	if(index >= 0 && index < CarpeMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void CarpeMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < CarpeMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int CarpeMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < CarpeMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
CartwMarket::CartwMarket()
{
	Reset();
}
void CartwMarket::Reset()
{
	numSlots = CartwMarketTotal;

	for(int i = 0; i < CartwMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itTrans);		Stock[0].SetNumber(0);	Stock[1].SetWhat(itSmCart01);	Stock[1].SetNumber(0);
	Stock[2].SetWhat(itSmCart02);	Stock[2].SetNumber(0);	Stock[3].SetWhat(itLgCart01);	Stock[3].SetNumber(0);
	Stock[4].SetWhat(itLgCart02);	Stock[4].SetNumber(0);	Stock[5].SetWhat(itSmWag01);	Stock[5].SetNumber(0);
	Stock[6].SetWhat(itSmWag02);	Stock[6].SetNumber(0);	Stock[7].SetWhat(itLgWag01);	Stock[7].SetNumber(0);
	Stock[8].SetWhat(itLgWag02);	Stock[8].SetNumber(0);		
}
void CartwMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < CartwMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int CartwMarket::getShelfItem(int index)
{
	if(index >= 0 && index < CartwMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void CartwMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < CartwMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int CartwMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < CartwMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
CartoMarket::CartoMarket()
{
	Reset();
}
void CartoMarket::Reset()
{
	numSlots = CartoMarketTotal;

	for(int i = 0; i < CartoMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itBirFeath);		Stock[0].SetNumber(0);
	Stock[1].SetWhat(itHarpFeath);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itPorcQuill);		Stock[2].SetNumber(0);
}
void CartoMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < CartoMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int CartoMarket::getShelfItem(int index)
{
	if(index >= 0 && index < CartoMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void CartoMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < CartoMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int CartoMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < CartoMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
CheesMarket::CheesMarket()
{
	Reset();
}
void CheesMarket::Reset()
{
	numSlots = CheesMarketTotal;

	for(int i = 0; i < CheesMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void CheesMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < CheesMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int CheesMarket::getShelfItem(int index)
{
	if(index >= 0 && index < CheesMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void CheesMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < CheesMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int CheesMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < CheesMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
ChurcMarket::ChurcMarket()
{
	Reset();
}
void ChurcMarket::Reset()
{
	numSlots = ChurcMarketTotal;

	for(int i = 0; i < ChurcMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itBirFeath);		Stock[0].SetNumber(0);
	Stock[1].SetWhat(itHarpFeath);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itPorcQuill);		Stock[2].SetNumber(0);
}
void ChurcMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < ChurcMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int ChurcMarket::getShelfItem(int index)
{
	if(index >= 0 && index < ChurcMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void ChurcMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < ChurcMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int ChurcMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < ChurcMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
DocksMarket::DocksMarket()
{
	Reset();
}
void DocksMarket::Reset()
{
	numSlots = DocksMarketTotal;

	for(int i = 0; i < DocksMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itBadgClaw);		Stock[0].SetNumber(0);	Stock[1].SetWhat(itBasiClaw);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itBuffHorn);		Stock[2].SetNumber(0);	Stock[3].SetWhat(itCattHorn);		Stock[3].SetNumber(0);
	Stock[4].SetWhat(itCrocTeet);		Stock[4].SetNumber(0);	Stock[5].SetWhat(itDragClaw);		Stock[5].SetNumber(0);
	Stock[6].SetWhat(itDragHorn);		Stock[6].SetNumber(0);	Stock[7].SetWhat(itGoatHorn);		Stock[7].SetNumber(0);
	Stock[8].SetWhat(itWStaHorn);		Stock[8].SetNumber(0);	Stock[9].SetWhat(itWBoaTusk);		Stock[9].SetNumber(0);
	Stock[10].SetWhat(itWolvClaw);		Stock[10].SetNumber(0);
}
void DocksMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < DocksMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int DocksMarket::getShelfItem(int index)
{
	if(index >= 0 && index < DocksMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void DocksMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < DocksMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int DocksMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < DocksMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
FarmeMarket::FarmeMarket()
{
	Reset();
}
void FarmeMarket::Reset()
{
	numSlots = FarmeMarketTotal;

	for(int i = 0; i < FarmeMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void FarmeMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < FarmeMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int FarmeMarket::getShelfItem(int index)
{
	if(index >= 0 && index < FarmeMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void FarmeMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < FarmeMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int FarmeMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < FarmeMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
GuardMarket::GuardMarket()
{
	Reset();
}
void GuardMarket::Reset()
{
	numSlots = GuardMarketTotal;

	for(int i = 0; i < GuardMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itAnteMeat);		Stock[0].SetNumber(0);	Stock[1].SetWhat(itBearMeat);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itBeavMeat);		Stock[2].SetNumber(0);	Stock[3].SetWhat(itBirdMeat);		Stock[3].SetNumber(0);
	Stock[4].SetWhat(itBuffMeat);		Stock[4].SetNumber(0);	Stock[5].SetWhat(itCattMeat);		Stock[5].SetNumber(0);
	Stock[6].SetWhat(itErmiMeat);		Stock[6].SetNumber(0);	Stock[7].SetWhat(itFerrMeat);		Stock[7].SetNumber(0);
	Stock[8].SetWhat(itHorseMeat);		Stock[8].SetNumber(0);	Stock[9].SetWhat(itHorseTail);		Stock[9].SetNumber(0);
	Stock[10].SetWhat(itPigDoMeat);		Stock[10].SetNumber(0);	Stock[11].SetWhat(itPigWiMeat);		Stock[11].SetNumber(0);
	Stock[12].SetWhat(itRabbiMeat);		Stock[12].SetNumber(0);	Stock[13].SetWhat(itSheepMeat);		Stock[13].SetNumber(0);
}
void GuardMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < GuardMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int GuardMarket::getShelfItem(int index)
{
	if(index >= 0 && index < GuardMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void GuardMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < GuardMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int GuardMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < GuardMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
Inn_Market::Inn_Market()
{
	Reset();
}
void Inn_Market::Reset()
{
	numSlots = Inn_MarketTotal;

	for(int i = 0; i < Inn_MarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itAnteMeat);		Stock[0].SetNumber(0);	Stock[1].SetWhat(itBadgMeat);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itBearMeat);		Stock[2].SetNumber(0);	Stock[3].SetWhat(itBeavMeat);		Stock[3].SetNumber(0);
	Stock[4].SetWhat(itBirdMeat);		Stock[4].SetNumber(0);	Stock[5].SetWhat(itBuffHide);		Stock[5].SetNumber(0);
	Stock[6].SetWhat(itBuffMeat);		Stock[6].SetNumber(0);	Stock[7].SetWhat(itCatMeat);		Stock[7].SetNumber(0);
	Stock[8].SetWhat(itCattMeat);		Stock[8].SetNumber(0);	Stock[9].SetWhat(itChipMeat);		Stock[9].SetNumber(0);
	Stock[10].SetWhat(itCrocMeat);		Stock[10].SetNumber(0);	Stock[11].SetWhat(itDogMeat);		Stock[11].SetNumber(0);
	Stock[12].SetWhat(itErmiMeat);		Stock[12].SetNumber(0);	Stock[13].SetWhat(itFerrMeat);		Stock[13].SetNumber(0);
	Stock[14].SetWhat(itFoxMeat);		Stock[14].SetNumber(0);	Stock[15].SetWhat(itGoatMeat);		Stock[15].SetNumber(0);
	Stock[16].SetWhat(itGophMea);		Stock[16].SetNumber(0);	Stock[17].SetWhat(itGoriMeat);		Stock[17].SetNumber(0);
	Stock[18].SetWhat(itHedgeMeat);		Stock[18].SetNumber(0);	Stock[19].SetWhat(itHorseMeat);		Stock[19].SetNumber(0);
	Stock[20].SetWhat(itOctopTent);		Stock[20].SetNumber(0);	Stock[21].SetWhat(itOtteMeat);		Stock[21].SetNumber(0);
	Stock[22].SetWhat(itOttSeMeat);		Stock[22].SetNumber(0);	Stock[23].SetWhat(itPigDoMeat);		Stock[23].SetNumber(0);
	Stock[24].SetWhat(itPigWiMeat);		Stock[24].SetNumber(0);	Stock[25].SetWhat(itRaccoMeat);		Stock[25].SetNumber(0);
	Stock[26].SetWhat(itRabbiMeat);		Stock[26].SetNumber(0);	Stock[27].SetWhat(itSheepMeat);		Stock[27].SetNumber(0);
	Stock[28].SetWhat(itSnakeMeat);		Stock[28].SetNumber(0);	Stock[29].SetWhat(itSquidTent);		Stock[29].SetNumber(0);
	Stock[30].SetWhat(itSquirMeat);		Stock[30].SetNumber(0);	Stock[31].SetWhat(itSqFlyMeat);		Stock[31].SetNumber(0);
	Stock[32].SetWhat(itWartMeat);		Stock[32].SetNumber(0);	Stock[33].SetWhat(itWeasMeat);		Stock[33].SetNumber(0);
	Stock[34].SetWhat(itWBoaMeat);		Stock[34].SetNumber(0);	Stock[35].SetWhat(itWStaMeat);		Stock[35].SetNumber(0);
	Stock[36].SetWhat(itWdchMeat);		Stock[36].SetNumber(0);	Stock[37].SetWhat(itWolfMeat);		Stock[37].SetNumber(0);
	Stock[38].SetWhat(itWolvMeat);		Stock[38].SetNumber(0);
}
void Inn_Market::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < Inn_MarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int Inn_Market::getShelfItem(int index)
{
	if(index >= 0 && index < Inn_MarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void Inn_Market::setQuant(int index, int data)
{
	if(index >= 0 && index < Inn_MarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int Inn_Market::getShelfQuan(int index)
{
	if(index >= 0 && index < Inn_MarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
JewelMarket::JewelMarket()
{
	Reset();
}
void JewelMarket::Reset()
{
	numSlots = JewelMarketTotal;

	for(int i = 0; i < JewelMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itBrow);		Stock[0].SetNumber(0);	Stock[1].SetWhat(itEar);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itPend_01);	Stock[2].SetNumber(0);	Stock[3].SetWhat(itNaval);		Stock[3].SetNumber(0);
	Stock[4].SetWhat(itWrist);		Stock[4].SetNumber(0);	Stock[5].SetWhat(itRing_01);	Stock[5].SetNumber(0);
	Stock[6].SetWhat(itDragClaw);	Stock[6].SetNumber(0);
}
void JewelMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < JewelMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int JewelMarket::getShelfItem(int index)
{
	if(index >= 0 && index < JewelMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void JewelMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < JewelMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int JewelMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < JewelMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
LeathMarket::LeathMarket()
{
	Reset();
}
void LeathMarket::Reset()
{
	numSlots = LeathMarketTotal;

	for(int i = 0; i < LeathMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itHiLegs);			Stock[0].SetNumber(0);	
	Stock[1].SetWhat(itHiWst);			Stock[1].SetNumber(0);
	Stock[2].SetWhat(itHiChest);		Stock[2].SetNumber(0);	
	Stock[3].SetWhat(itHiArms);			Stock[3].SetNumber(0);
	Stock[4].SetWhat(itHiGlove);		Stock[4].SetNumber(0);	
	Stock[5].SetWhat(itHiShoul);		Stock[5].SetNumber(0);
	Stock[6].SetWhat(itHiNeck);			Stock[6].SetNumber(0);	
	Stock[7].SetWhat(itHiHead);			Stock[7].SetNumber(0);
	Stock[8].SetWhat(itBack);			Stock[8].SetNumber(0);	
	Stock[9].SetWhat(itBP_01);			Stock[9].SetNumber(0);	
	Stock[10].SetWhat(itBP_02);			Stock[10].SetNumber(0);	
	Stock[11].SetWhat(itLeLegs);		Stock[11].SetNumber(0);	
	Stock[12].SetWhat(itLeWst);			Stock[12].SetNumber(0);	
	Stock[13].SetWhat(itLeChest);		Stock[13].SetNumber(0);	
	Stock[14].SetWhat(itLeArms);		Stock[14].SetNumber(0);	
	Stock[15].SetWhat(itLeGlove);		Stock[15].SetNumber(0);	
	Stock[16].SetWhat(itLeShoul);		Stock[16].SetNumber(0);	
	Stock[17].SetWhat(itLeNeck);		Stock[17].SetNumber(0);	
	Stock[18].SetWhat(itLeHead);		Stock[18].SetNumber(0);	
	Stock[19].SetWhat(itStLegs);		Stock[19].SetNumber(0);	
	Stock[20].SetWhat(itStWst);			Stock[20].SetNumber(0);	
	Stock[21].SetWhat(itStChest);		Stock[21].SetNumber(0);	
	Stock[22].SetWhat(itStArms);		Stock[22].SetNumber(0);	
	Stock[23].SetWhat(itStGlove);		Stock[23].SetNumber(0);	
	Stock[24].SetWhat(itStShoul);		Stock[24].SetNumber(0);	
	Stock[25].SetWhat(itStNeck);		Stock[25].SetNumber(0);	
	Stock[26].SetWhat(itStHead);		Stock[26].SetNumber(0);	
	Stock[27].SetWhat(itPouch);			Stock[27].SetNumber(0);
	Stock[28].SetWhat(itPo_01);			Stock[28].SetNumber(0);	
	Stock[29].SetWhat(itPo_02);			Stock[29].SetNumber(0);
	Stock[30].SetWhat(itCap);			Stock[30].SetNumber(0);	
	Stock[31].SetWhat(itBelt);			Stock[31].SetNumber(0);	
	Stock[32].SetWhat(itShoes);			Stock[32].SetNumber(0);	
	Stock[33].SetWhat(itSandals);		Stock[33].SetNumber(0);	
	Stock[34].SetWhat(itStBoots);		Stock[34].SetNumber(0);	
	Stock[35].SetWhat(itLeBoots);		Stock[35].SetNumber(0);	
	Stock[36].SetWhat(itRdBoots);		Stock[36].SetNumber(0);	
	Stock[37].SetWhat(itCavBoots);		Stock[37].SetNumber(0);	
	Stock[38].SetWhat(itAnteHide);		Stock[38].SetNumber(0);	
	Stock[39].SetWhat(itBadgClaw);		Stock[39].SetNumber(0);	
	Stock[40].SetWhat(itBasiClaw);		Stock[40].SetNumber(0);	
	Stock[41].SetWhat(itBasiHide);		Stock[41].SetNumber(0);	
	Stock[42].SetWhat(itBasiTeet);		Stock[42].SetNumber(0);	
	Stock[43].SetWhat(itBearHide);		Stock[43].SetNumber(0);	
	Stock[44].SetWhat(itBuffHorn);		Stock[44].SetNumber(0);	
	Stock[45].SetWhat(itBuffHide);		Stock[45].SetNumber(0);	
	Stock[46].SetWhat(itCattHorn);		Stock[46].SetNumber(0);	
	Stock[47].SetWhat(itCattHide);		Stock[47].SetNumber(0);	
	Stock[48].SetWhat(itCrocTeet);		Stock[48].SetNumber(0);	
	Stock[49].SetWhat(itCrocHide);		Stock[49].SetNumber(0);	
	Stock[50].SetWhat(itDolpHide);		Stock[50].SetNumber(0);	
	Stock[51].SetWhat(itDragClaw);		Stock[51].SetNumber(0);	
	Stock[52].SetWhat(itDragHide);		Stock[52].SetNumber(0);	
	Stock[53].SetWhat(itGargHide);		Stock[53].SetNumber(0);	
	Stock[54].SetWhat(itGrifHide);		Stock[54].SetNumber(0);	
	Stock[55].SetWhat(itHorseHide);		Stock[55].SetNumber(0);	
	Stock[56].SetWhat(itHydraHide);		Stock[56].SetNumber(0);	
	Stock[57].SetWhat(itMinotHorn);		Stock[57].SetNumber(0);	
	Stock[58].SetWhat(itPigDoHide);		Stock[58].SetNumber(0);	
	Stock[59].SetWhat(itPigWiHide);		Stock[59].SetNumber(0);	
	Stock[60].SetWhat(itSnakeHide);		Stock[60].SetNumber(0);	
}
void LeathMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < LeathMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int LeathMarket::getShelfItem(int index)
{
	if(index >= 0 && index < LeathMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void LeathMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < LeathMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int LeathMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < LeathMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
LiverMarket::LiverMarket()
{
	Reset();
}
void LiverMarket::Reset()
{
	numSlots = LiverMarketTotal;

	for(int i = 0; i < LiverMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void LiverMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < LiverMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int LiverMarket::getShelfItem(int index)
{
	if(index >= 0 && index < LiverMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void LiverMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < LiverMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int LiverMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < LiverMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
LocksMarket::LocksMarket()
{
	Reset();
}
void LocksMarket::Reset()
{
	numSlots = LocksMarketTotal;

	for(int i = 0; i < LocksMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void LocksMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < LocksMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int LocksMarket::getShelfItem(int index)
{
	if(index >= 0 && index < LocksMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void LocksMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < LocksMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int LocksMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < LocksMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
MarkeMarket::MarkeMarket()
{
	Reset();
}
void MarkeMarket::Reset()
{
	numSlots = MarkeMarketTotal;

	for(int i = 0; i < MarkeMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itAnteMeat);	Stock[0].SetNumber(0);	Stock[1].SetWhat(itBearMeat);	Stock[1].SetNumber(0);	
	Stock[2].SetWhat(itBeavMeat);	Stock[2].SetNumber(0);	Stock[3].SetWhat(itBirFeath);	Stock[3].SetNumber(0);	
	Stock[4].SetWhat(itBirdMeat);	Stock[4].SetNumber(0);	Stock[5].SetWhat(itBuffHide);	Stock[5].SetNumber(0);	
	Stock[6].SetWhat(itBuffMeat);	Stock[6].SetNumber(0);	Stock[7].SetWhat(itCattHide);	Stock[7].SetNumber(0);	
	Stock[8].SetWhat(itCattMeat);	Stock[8].SetNumber(0);	Stock[9].SetWhat(itGoatMeat);	Stock[9].SetNumber(0);	
	Stock[10].SetWhat(itHorseMeat);	Stock[10].SetNumber(0);	Stock[11].SetWhat(itPigDoMeat);	Stock[11].SetNumber(0);		
	Stock[12].SetWhat(itPigWiMeat);	Stock[12].SetNumber(0);
}
void MarkeMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < MarkeMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int MarkeMarket::getShelfItem(int index)
{
	if(index >= 0 && index < MarkeMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void MarkeMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < MarkeMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int MarkeMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < MarkeMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
MasonMarket::MasonMarket()
{
	Reset();
}
void MasonMarket::Reset()
{
	numSlots = MasonMarketTotal;

	for(int i = 0; i < MasonMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void MasonMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < MasonMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int MasonMarket::getShelfItem(int index)
{
	if(index >= 0 && index < MasonMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void MasonMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < MasonMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int MasonMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < MasonMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
MinorMarket::MinorMarket()
{
	Reset();
}
void MinorMarket::Reset()
{
	numSlots = MinorMarketTotal;

	for(int i = 0; i < MinorMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void MinorMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < MinorMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int MinorMarket::getShelfItem(int index)
{
	if(index >= 0 && index < MinorMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void MinorMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < MinorMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int MinorMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < MinorMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
PotteMarket::PotteMarket()
{
	Reset();
}
void PotteMarket::Reset()
{
	numSlots = PotteMarketTotal;

	for(int i = 0; i < PotteMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void PotteMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < PotteMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int PotteMarket::getShelfItem(int index)
{
	if(index >= 0 && index < PotteMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void PotteMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < PotteMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int PotteMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < PotteMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
RopeMMarket::RopeMMarket()
{
	Reset();
}
void RopeMMarket::Reset()
{
	numSlots = RopeMMarketTotal;

	for(int i = 0; i < RopeMMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void RopeMMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < RopeMMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int RopeMMarket::getShelfItem(int index)
{
	if(index >= 0 && index < RopeMMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void RopeMMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < RopeMMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int RopeMMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < RopeMMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
SchooMarket::SchooMarket()
{
	Reset();
}
void SchooMarket::Reset()
{
	numSlots = SchooMarketTotal;

	for(int i = 0; i < SchooMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itBirFeath);		Stock[0].SetNumber(0);
	Stock[1].SetWhat(itHarpFeath);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itPorcQuill);		Stock[2].SetNumber(0);
}
void SchooMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < SchooMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int SchooMarket::getShelfItem(int index)
{
	if(index >= 0 && index < SchooMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void SchooMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < SchooMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int SchooMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < SchooMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
TailoMarket::TailoMarket()
{
	Reset();
}
void TailoMarket::Reset()
{
	numSlots = TailoMarketTotal;

	for(int i = 0; i < TailoMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itPants);			Stock[0].SetNumber(0);	Stock[1].SetWhat(itPants_01);		Stock[1].SetNumber(0);	
	Stock[2].SetWhat(itPants_02);		Stock[2].SetNumber(0);	Stock[3].SetWhat(itPants_03);		Stock[3].SetNumber(0);
	Stock[4].SetWhat(itBreech);			Stock[4].SetNumber(0);	Stock[5].SetWhat(itHose);			Stock[5].SetNumber(0);
	Stock[6].SetWhat(itShirt);			Stock[6].SetNumber(0);	Stock[7].SetWhat(itShirt_01);		Stock[7].SetNumber(0);
	Stock[8].SetWhat(itShirt_02);		Stock[8].SetNumber(0);	Stock[9].SetWhat(itShirt_03);		Stock[9].SetNumber(0);
	Stock[10].SetWhat(itGown);			Stock[10].SetNumber(0);	Stock[11].SetWhat(itRobe);			Stock[11].SetNumber(0);	
	Stock[12].SetWhat(itToga);			Stock[12].SetNumber(0);	Stock[13].SetWhat(itTunic);			Stock[13].SetNumber(0);
	Stock[14].SetWhat(itLegs);			Stock[14].SetNumber(0);	Stock[15].SetWhat(itPaWst);			Stock[15].SetNumber(0);
	Stock[16].SetWhat(itChest);			Stock[16].SetNumber(0);	Stock[17].SetWhat(itArms);			Stock[17].SetNumber(0);
	Stock[18].SetWhat(itShould);		Stock[18].SetNumber(0);	Stock[19].SetWhat(itNeck);		Stock[19].SetNumber(0);
	Stock[20].SetWhat(itPaHead);		Stock[20].SetNumber(0);	Stock[21].SetWhat(itPaGlove);		Stock[21].SetNumber(0);
	Stock[22].SetWhat(itHead);			Stock[22].SetNumber(0);	Stock[23].SetWhat(itSurcoat);		Stock[23].SetNumber(0);	
	Stock[24].SetWhat(itVest);			Stock[24].SetNumber(0);	Stock[25].SetWhat(itTabbard);		Stock[25].SetNumber(0);
	Stock[26].SetWhat(itWaist);			Stock[26].SetNumber(0);	Stock[27].SetWhat(itGlove);			Stock[27].SetNumber(0);	
	Stock[28].SetWhat(itMitten);		Stock[28].SetNumber(0);	Stock[29].SetWhat(itCloak);			Stock[29].SetNumber(0);
	Stock[30].SetWhat(itAnteHide);		Stock[30].SetNumber(0);	Stock[31].SetWhat(itBadgClaw);		Stock[31].SetNumber(0);
	Stock[32].SetWhat(itBadgHide);		Stock[32].SetNumber(0);	Stock[33].SetWhat(itBasiHide);		Stock[33].SetNumber(0);
	Stock[34].SetWhat(itBasiTeet);		Stock[34].SetNumber(0);	Stock[35].SetWhat(itBearHide);		Stock[35].SetNumber(0);
	Stock[36].SetWhat(itBeavHide);		Stock[36].SetNumber(0);	Stock[37].SetWhat(itBirFeath);		Stock[37].SetNumber(0);
	Stock[38].SetWhat(itBuffHorn);		Stock[38].SetNumber(0);	Stock[39].SetWhat(itBuffHide);		Stock[39].SetNumber(0);
	Stock[40].SetWhat(itCatHide);		Stock[40].SetNumber(0);	Stock[41].SetWhat(itCattHorn);		Stock[41].SetNumber(0);
	Stock[42].SetWhat(itChipHide);		Stock[42].SetNumber(0);	Stock[43].SetWhat(itCrocTeet);		Stock[43].SetNumber(0);
	Stock[44].SetWhat(itCrocHide);		Stock[44].SetNumber(0);	Stock[45].SetWhat(itDogHide);		Stock[45].SetNumber(0);
	Stock[46].SetWhat(itDragClaw);		Stock[46].SetNumber(0);	Stock[47].SetWhat(itDragHorn);		Stock[47].SetNumber(0);
	Stock[48].SetWhat(itErmiHide);		Stock[48].SetNumber(0);	Stock[49].SetWhat(itFerrHide);		Stock[49].SetNumber(0);
	Stock[50].SetWhat(itFoxHide);		Stock[50].SetNumber(0);	Stock[51].SetWhat(itGoatHorn);		Stock[51].SetNumber(0);
	Stock[52].SetWhat(itGoatHide);		Stock[52].SetNumber(0);	Stock[53].SetWhat(itGophHide);		Stock[53].SetNumber(0);
	Stock[54].SetWhat(itGoriHide);		Stock[54].SetNumber(0);	Stock[55].SetWhat(itHarpFeath);		Stock[55].SetNumber(0);
	Stock[56].SetWhat(itHedgeHide);		Stock[56].SetNumber(0);	Stock[57].SetWhat(itHorseHide);		Stock[57].SetNumber(0);
	Stock[58].SetWhat(itHorseTail);		Stock[58].SetNumber(0);	Stock[59].SetWhat(itMinkHide);		Stock[59].SetNumber(0);
	Stock[60].SetWhat(itMuskrHide);		Stock[60].SetNumber(0);	Stock[61].SetWhat(itOtteHide);		Stock[61].SetNumber(0);
	Stock[62].SetWhat(itOttSeHide);		Stock[62].SetNumber(0);	Stock[63].SetWhat(itPigDoHide);		Stock[63].SetNumber(0);
	Stock[64].SetWhat(itPigWiHide);		Stock[64].SetNumber(0);	Stock[65].SetWhat(itRabbiHide);		Stock[65].SetNumber(0);
	Stock[66].SetWhat(itRaccoHide);		Stock[66].SetNumber(0);	Stock[67].SetWhat(itSheepHide);		Stock[67].SetNumber(0);
	Stock[68].SetWhat(itSheepWool);		Stock[68].SetNumber(0);	Stock[69].SetWhat(itSkunkHide);		Stock[69].SetNumber(0);
	Stock[70].SetWhat(itSphinHide);		Stock[70].SetNumber(0);	Stock[71].SetWhat(itSquirHide);		Stock[71].SetNumber(0);
	Stock[72].SetWhat(itSqFlyHide);		Stock[72].SetNumber(0);	Stock[73].SetWhat(itWartHide);		Stock[73].SetNumber(0);
	Stock[74].SetWhat(itWeasHide);		Stock[74].SetNumber(0);	Stock[75].SetWhat(itWBoaHide);		Stock[75].SetNumber(0);	
	Stock[76].SetWhat(itWStaHide);		Stock[76].SetNumber(0);	Stock[77].SetWhat(itWolvHide);		Stock[77].SetNumber(0);
	Stock[78].SetWhat(itWdchHide);		Stock[78].SetNumber(0);	Stock[79].SetWhat(itWolfHide);		Stock[79].SetNumber(0);
}
void TailoMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < TailoMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int TailoMarket::getShelfItem(int index)
{
	if(index >= 0 && index < TailoMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void TailoMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < TailoMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int TailoMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < TailoMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
TheatMarket::TheatMarket()
{
	Reset();
}
void TheatMarket::Reset()
{
	numSlots = TheatMarketTotal;

	for(int i = 0; i < TheatMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itBirFeath);		Stock[0].SetNumber(0);
	Stock[1].SetWhat(itHarpFeath);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itPorcQuill);		Stock[2].SetNumber(0);
}
void TheatMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < TheatMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int TheatMarket::getShelfItem(int index)
{
	if(index >= 0 && index < TheatMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void TheatMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < TheatMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int TheatMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < TheatMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
ThievMarket::ThievMarket()
{
	Reset();
}
void ThievMarket::Reset()
{
	numSlots = ThievMarketTotal;

	for(int i = 0; i < ThievMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itBrow);			Stock[0].SetNumber(0);
	Stock[1].SetWhat(itEar);			Stock[1].SetNumber(0);
	Stock[2].SetWhat(itPend_01);		Stock[2].SetNumber(0);
	Stock[3].SetWhat(itNaval);			Stock[3].SetNumber(0);
	Stock[4].SetWhat(itWrist);			Stock[4].SetNumber(0);
	Stock[5].SetWhat(itRing_01);		Stock[5].SetNumber(0);
	Stock[6].SetWhat(itScorpStin);		Stock[6].SetNumber(0);
	Stock[7].SetWhat(itSnakeFang);		Stock[7].SetNumber(0);
}
void ThievMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < ThievMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int ThievMarket::getShelfItem(int index)
{
	if(index >= 0 && index < ThievMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void ThievMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < ThievMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int ThievMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < ThievMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
WeapoMarket::WeapoMarket()
{
	Reset();
}
void WeapoMarket::Reset()
{
	numSlots = WeapoMarketTotal;

	for(int i = 0; i < WeapoMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itAnteHorn);	Stock[0].SetNumber(0);	Stock[1].SetWhat(itBadgClaw);	Stock[1].SetNumber(0);
	Stock[2].SetWhat(itBasiClaw);	Stock[2].SetNumber(0);	Stock[3].SetWhat(itBasiTeet);	Stock[3].SetNumber(0);
	Stock[4].SetWhat(itBuffHorn);	Stock[4].SetNumber(0);	Stock[5].SetWhat(itCattHorn);	Stock[5].SetNumber(0);
	Stock[6].SetWhat(itCrocTeet);	Stock[6].SetNumber(0);	Stock[7].SetWhat(itDragClaw);	Stock[7].SetNumber(0);
	Stock[8].SetWhat(itDragHorn);	Stock[8].SetNumber(0);	Stock[9].SetWhat(itMinotHorn);	Stock[9].SetNumber(0);
	Stock[10].SetWhat(itFireCoal);	Stock[10].SetNumber(0);	Stock[11].SetWhat(itBastSw);	Stock[11].SetNumber(0);
	Stock[12].SetWhat(itBattAxe);	Stock[12].SetNumber(0);	Stock[13].SetWhat(itLgBow);		Stock[13].SetNumber(0);
	Stock[14].SetWhat(itStBow);		Stock[14].SetNumber(0);	Stock[15].SetWhat(itBrdSw);		Stock[15].SetNumber(0);
	Stock[16].SetWhat(itClub);		Stock[16].SetNumber(0);	Stock[17].SetWhat(itCLgBow);	Stock[17].SetNumber(0);
	Stock[18].SetWhat(itCStBow);	Stock[18].SetNumber(0);	Stock[19].SetWhat(itCBow);		Stock[19].SetNumber(0);
	Stock[20].SetWhat(itDagger);	Stock[20].SetNumber(0);	Stock[21].SetWhat(itFlail);		Stock[21].SetNumber(0);
	Stock[22].SetWhat(itHandAxe);	Stock[22].SetNumber(0);	Stock[23].SetWhat(itLance);		Stock[23].SetNumber(0);
	Stock[24].SetWhat(itLgSw);		Stock[24].SetNumber(0);	Stock[25].SetWhat(itMace);		Stock[25].SetNumber(0);
	Stock[26].SetWhat(itMoStar);	Stock[26].SetNumber(0);	Stock[27].SetWhat(itPick);		Stock[27].SetNumber(0);
	Stock[28].SetWhat(itQrStaff);	Stock[28].SetNumber(0);	Stock[29].SetWhat(itScim);		Stock[29].SetNumber(0);
	Stock[30].SetWhat(itScourge);	Stock[30].SetNumber(0);	Stock[31].SetWhat(itStSw);		Stock[31].SetNumber(0);
	Stock[32].SetWhat(itSickle);	Stock[32].SetNumber(0);	Stock[33].SetWhat(itSpear);		Stock[33].SetNumber(0);
	Stock[34].SetWhat(itTrident);	Stock[34].SetNumber(0);	Stock[35].SetWhat(itWarHam);	Stock[35].SetNumber(0);
	Stock[36].SetWhat(itWhip);		Stock[36].SetNumber(0);	Stock[37].SetWhat(itSWoSh);		Stock[37].SetNumber(0);
	Stock[38].SetWhat(itMWoSh);		Stock[38].SetNumber(0);	Stock[39].SetWhat(itLWoSh);		Stock[39].SetNumber(0);
	Stock[40].SetWhat(itSMeSh);		Stock[40].SetNumber(0);	Stock[41].SetWhat(itMMeSh);		Stock[41].SetNumber(0);
	Stock[42].SetWhat(itLMeSh);		Stock[42].SetNumber(0);
}
void WeapoMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < WeapoMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int WeapoMarket::getShelfItem(int index)
{
	if(index >= 0 && index < WeapoMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void WeapoMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < WeapoMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int WeapoMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < WeapoMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
WinerMarket::WinerMarket()
{
	Reset();
}
void WinerMarket::Reset()
{
	numSlots = WinerMarketTotal;

	for(int i = 0; i < WinerMarketTotal; i++)
		Stock[i].Reset();

//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
//	Stock[].SetWhat();		Stock[].SetNumber(0);
}
void WinerMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < WinerMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int WinerMarket::getShelfItem(int index)
{
	if(index >= 0 && index < WinerMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void WinerMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < WinerMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int WinerMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < WinerMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}
WizarMarket::WizarMarket()
{
	Reset();
}
void WizarMarket::Reset()
{
	numSlots = WizarMarketTotal;

	for(int i = 0; i < WizarMarketTotal; i++)
		Stock[i].Reset();

	Stock[0].SetWhat(itBadgClaw);		Stock[0].SetNumber(0);		Stock[1].SetWhat(itBasiClaw);		Stock[1].SetNumber(0);
	Stock[2].SetWhat(itBasiTeet);		Stock[2].SetNumber(0);		Stock[3].SetWhat(itBatWing);		Stock[3].SetNumber(0);
	Stock[4].SetWhat(itBatHide);		Stock[4].SetNumber(0);		Stock[5].SetWhat(itBatEar);			Stock[5].SetNumber(0);
	Stock[6].SetWhat(itBeavTail);		Stock[6].SetNumber(0);		Stock[7].SetWhat(itBirdBeak);		Stock[7].SetNumber(0);
	Stock[8].SetWhat(itBirFeath);		Stock[8].SetNumber(0);		Stock[9].SetWhat(itBrowHair);		Stock[9].SetNumber(0);
	Stock[10].SetWhat(itBrowEar);		Stock[10].SetNumber(0);		Stock[11].SetWhat(itBuffHorn);		Stock[11].SetNumber(0);
	Stock[12].SetWhat(itBugbHair);		Stock[12].SetNumber(0);		Stock[13].SetWhat(itBugbEar);		Stock[13].SetNumber(0);
	Stock[14].SetWhat(itCatEye);		Stock[14].SetNumber(0);		Stock[15].SetWhat(itCatEar);		Stock[15].SetNumber(0);
	Stock[16].SetWhat(itCentHair);		Stock[16].SetNumber(0);		Stock[17].SetWhat(itCentEar);		Stock[17].SetNumber(0);
	Stock[18].SetWhat(itCentTail);		Stock[18].SetNumber(0);		Stock[19].SetWhat(itCentHide);		Stock[19].SetNumber(0);
	Stock[20].SetWhat(itChimWing);		Stock[20].SetNumber(0);		Stock[21].SetWhat(itChimHide);		Stock[21].SetNumber(0);
	Stock[22].SetWhat(itChimTail);		Stock[22].SetNumber(0);		Stock[23].SetWhat(itCocFeath);		Stock[23].SetNumber(0);
	Stock[24].SetWhat(itCockMeat);		Stock[24].SetNumber(0);		Stock[25].SetWhat(itCockBeak);		Stock[25].SetNumber(0);
	Stock[26].SetWhat(itDolpSnout);		Stock[26].SetNumber(0);		Stock[27].SetWhat(itDragClaw);		Stock[27].SetNumber(0);
	Stock[28].SetWhat(itDragEye);		Stock[28].SetNumber(0);		Stock[29].SetWhat(itDryadHai);		Stock[29].SetNumber(0);
	Stock[30].SetWhat(itWoodSpir);		Stock[30].SetNumber(0);		Stock[31].SetWhat(itDwarfHai);		Stock[31].SetNumber(0);
	Stock[32].SetWhat(itDwarfEar);		Stock[32].SetNumber(0);		Stock[33].SetWhat(itDwarfArm);		Stock[33].SetNumber(0);
	Stock[34].SetWhat(itElfHair);		Stock[34].SetNumber(0);		Stock[35].SetWhat(itElfEar);		Stock[35].SetNumber(0);
	Stock[36].SetWhat(itElfEye);		Stock[36].SetNumber(0);		Stock[37].SetWhat(itElfArms);		Stock[37].SetNumber(0);
	Stock[38].SetWhat(itElfLeg);		Stock[38].SetNumber(0);		Stock[39].SetWhat(itGargHide);		Stock[39].SetNumber(0);
	Stock[40].SetWhat(itGargWing);		Stock[40].SetNumber(0);		Stock[41].SetWhat(itAirEssen);		Stock[41].SetNumber(0);
	Stock[42].SetWhat(itGhouHair);		Stock[42].SetNumber(0);		Stock[43].SetWhat(itGhouHide);		Stock[43].SetNumber(0);
	Stock[44].SetWhat(itGianHair);		Stock[44].SetNumber(0);		Stock[45].SetWhat(itGianEar);		Stock[45].SetNumber(0);
	Stock[46].SetWhat(itGianHide);		Stock[46].SetNumber(0);		Stock[47].SetWhat(itGnomHair);		Stock[47].SetNumber(0);
	Stock[48].SetWhat(itGnomNose);		Stock[48].SetNumber(0);		Stock[49].SetWhat(itGoblHair);		Stock[49].SetNumber(0);
	Stock[50].SetWhat(itGoblEar);		Stock[50].SetNumber(0);		Stock[51].SetWhat(itGoriArm);		Stock[51].SetNumber(0);
	Stock[52].SetWhat(itGoriHair);		Stock[52].SetNumber(0);		Stock[53].SetWhat(itGremHide);		Stock[53].SetNumber(0);
	Stock[54].SetWhat(itGremClaw);		Stock[54].SetNumber(0);		Stock[55].SetWhat(itGrifFeath);		Stock[55].SetNumber(0);
	Stock[56].SetWhat(itGrifTail);		Stock[56].SetNumber(0);		Stock[57].SetWhat(itHagHand);		Stock[57].SetNumber(0);
	Stock[58].SetWhat(itHarpFeath);		Stock[58].SetNumber(0);		Stock[59].SetWhat(itHarpyClaw);		Stock[59].SetNumber(0);
	Stock[60].SetWhat(itHarpyHead);		Stock[60].SetNumber(0);		Stock[61].SetWhat(itHobgoHair);		Stock[61].SetNumber(0);
	Stock[62].SetWhat(itHobgoEar);		Stock[62].SetNumber(0);		Stock[63].SetWhat(itHumanHair);		Stock[63].SetNumber(0);
	Stock[64].SetWhat(itHumanEar);		Stock[64].SetNumber(0);		Stock[65].SetWhat(itHumanHead);		Stock[65].SetNumber(0);
	Stock[66].SetWhat(itHydraTail);		Stock[66].SetNumber(0);		Stock[67].SetWhat(itImpHide);		Stock[67].SetNumber(0);
	Stock[68].SetWhat(itImpWing);		Stock[68].SetNumber(0);		Stock[69].SetWhat(itLepreHair);		Stock[69].SetNumber(0);
	Stock[70].SetWhat(itMermaHair);		Stock[70].SetNumber(0);		Stock[71].SetWhat(itMermaScal);		Stock[71].SetNumber(0);
	Stock[72].SetWhat(itMinotHorn);		Stock[72].SetNumber(0);		Stock[73].SetWhat(itMinotHead);		Stock[73].SetNumber(0);
	Stock[74].SetWhat(itMoleHide);		Stock[74].SetNumber(0);		Stock[75].SetWhat(itMouseHide);		Stock[75].SetNumber(0);
	Stock[76].SetWhat(itMouseTail);		Stock[76].SetNumber(0);		Stock[77].SetWhat(itMummyRag);		Stock[77].SetNumber(0);
	Stock[78].SetWhat(itNymphHair);		Stock[78].SetNumber(0);		Stock[79].SetWhat(itNymphHear);		Stock[79].SetNumber(0);
	Stock[80].SetWhat(itOgreHide);		Stock[80].SetNumber(0);		Stock[81].SetWhat(itOgreHair);		Stock[81].SetNumber(0);
	Stock[82].SetWhat(itOgreEar);		Stock[82].SetNumber(0);		Stock[83].SetWhat(itFireCoal);		Stock[83].SetNumber(0);
	Stock[84].SetWhat(itPorcQuill);		Stock[84].SetNumber(0);		Stock[85].SetWhat(itRatHide);		Stock[85].SetNumber(0);
	Stock[86].SetWhat(itRatTail);		Stock[86].SetNumber(0);		Stock[87].SetWhat(itScorpStin);		Stock[87].SetNumber(0);
	Stock[88].SetWhat(itSirenHair);		Stock[88].SetNumber(0);		Stock[89].SetWhat(itWaterSpir);		Stock[89].SetNumber(0);
	Stock[90].SetWhat(itSkeleBone);		Stock[90].SetNumber(0);		Stock[91].SetWhat(itSkunGland);		Stock[91].SetNumber(0);
	Stock[92].SetWhat(itSnakeHide);		Stock[92].SetNumber(0);		Stock[93].SetWhat(itSnakeFang);		Stock[93].SetNumber(0);
	Stock[94].SetWhat(itSphinHide);		Stock[94].SetNumber(0);		Stock[95].SetWhat(itSphinWing);		Stock[95].SetNumber(0);
	Stock[96].SetWhat(itSphinTail);		Stock[96].SetNumber(0);		Stock[97].SetWhat(itSpritHair);		Stock[97].SetNumber(0);
	Stock[98].SetWhat(itSpriteEar);		Stock[98].SetNumber(0);		Stock[99].SetWhat(itSpriteEye);		Stock[99].SetNumber(0);
	Stock[100].SetWhat(itTitanHair);	Stock[100].SetNumber(0);	Stock[101].SetWhat(itTitanEye);		Stock[101].SetNumber(0);
	Stock[102].SetWhat(itTitanEar);		Stock[102].SetNumber(0);	Stock[103].SetWhat(itTitanArm);		Stock[103].SetNumber(0);
	Stock[104].SetWhat(itTitanLeg);		Stock[104].SetNumber(0);	Stock[105].SetWhat(itTrolHead);		Stock[105].SetNumber(0);
	Stock[106].SetWhat(itTrolHair);		Stock[106].SetNumber(0);	Stock[107].SetWhat(itTrolHide);		Stock[107].SetNumber(0);
	Stock[108].SetWhat(itTrolClaw);		Stock[108].SetNumber(0);	Stock[109].SetWhat(itUnicHorn);		Stock[109].SetNumber(0);
	Stock[110].SetWhat(itUnicHide);		Stock[110].SetNumber(0);	Stock[111].SetWhat(itUnicMeat);		Stock[111].SetNumber(0);
	Stock[112].SetWhat(itVampFang);		Stock[112].SetNumber(0);	Stock[113].SetWhat(itVampHair);		Stock[113].SetNumber(0);
	Stock[114].SetWhat(itWStaHorn);		Stock[114].SetNumber(0);	Stock[115].SetWhat(itWBoaTusk);		Stock[115].SetNumber(0);
	Stock[116].SetWhat(itWolvClaw);		Stock[116].SetNumber(0);	Stock[117].SetWhat(itSwampEss);		Stock[117].SetNumber(0);
	Stock[118].SetWhat(itYetiHide);		Stock[118].SetNumber(0);	Stock[119].SetWhat(itZomFlesh);		Stock[119].SetNumber(0);
}
void WizarMarket::setShelf(int index, int what, int quant)
{
	if(index >= 0 && index < WizarMarketTotal)
	{
		Stock[index].SetWhat(what);
		Stock[index].SetNumber(quant);
	}
}
int WizarMarket::getShelfItem(int index)
{
	if(index >= 0 && index < WizarMarketTotal)
		return Stock[index].GetWhat();
	else return itNegOne;
}
void WizarMarket::setQuant(int index, int data)
{
	if(index >= 0 && index < WizarMarketTotal)
	{
		if(data >= 0 && data < 100)	Stock[index].SetNumber(data);
		else						Stock[index].SetNumber(0);
	}
}
int WizarMarket::getShelfQuan(int index)
{
	if(index >= 0 && index < WizarMarketTotal)
		return Stock[index].GetNumber();
	else return 0;
}