#include "C:\L\Avatars\Skill.h"
Skill::Skill()
{
	Reset();
}
Skill::~Skill()
{
	/*Empty Destructor*/
}
void Skill::Reset()
{
	Skill_ID	= Sk100;
	XP			= 0;
	Level		= 0;
	Timer		= 0;
}
void Skill::adjustXP(int amount)
{
	XP += amount;
	AssignLevel();
}
void Skill::UseSkill()
{
	switch(Skill_ID)
	{
	case SkAlchemy:		Timer = 16;		break; // Wizard
	case SkAniTrain:	Timer = 16;		break; // Tradesman
	case SkBalance:		Timer = 16;		break; // Thief
	case SkBargain:		Timer = 16;		break; // Generic
	case SkBegging:		Timer = 16;		break; // Thief
	case SkB_Smith:		Timer = 16;		break; // Tradesman
	case SkBoatWri:		Timer = 16;		break; // Tradesman
	case SkBowyer:		Timer = 16;		break; // Warrior
	case SkBrewing:		Timer = 16;		break; // Tradesman
	case SkCandle:		Timer = 16;		break; // Tradesman
	case SkCarpent:		Timer = 16;		break; // Tradesman
	case SkCartogr:		Timer = 16;		break; // Generic
	case SkCartWri:		Timer = 16;		break; // Tradesman
	case SkCheese:		Timer = 16;		break; // Tradesman
	case SkClimb:		Timer = 16;		break; // Thief
	case SkCooking:		Timer = 16;		break; // Generic
	case SkCraftIn:		Timer = 16;		break; // Tradesman
	case SkDiagnos:		Timer = 16;		break; // Cleric
	case SkDirSens:		Timer = 16;		break; // Generic
	case SkDisguis:		Timer = 16;		break; // Thief
	case SkEavesDr:		Timer = 16;		break; // Thief
	case SkEnduran:		Timer = 16;		break; // Warrior
	case SkEnginee:		Timer = 16;		break; // Tradesman
	case SkFarming:		Timer = 16;		break; // Tradesman
	case SkFieldSt:		Timer = 16;		break; // Wizard
	case SkFireBui:		Timer = 16;		break; // Generic
	case SkFishing:		Timer = 16;		break; // Generic
	case SkGemCutt:		Timer = 16;		break; // Tradesman
	case SkGeograp:		Timer = 16;		break; // Wizard
	case SkGeology:		Timer = 16;		break; // Wizard
	case SkHealing:		Timer = 16;		break; // Cleric
	case SkHerbali:		Timer = 16;		break; // Generic
	case SkHiding:		Timer = 16;		break; // Thief
	case SkJumping:		Timer = 16;		break; // Thief
	case SkLeaders:		Timer = 16;		break; // Warrior
	case SkLeathWo:		Timer = 16;		break; // Tradesman
	case SkLockPic:		Timer = 16;		break; // Thief
	case SkLockSmi:		Timer = 16;		break; // Thief
	case SkMeditat:		Timer = 16;		break; // Generic
	case SkMetalSm:		Timer = 16;		break; // Tradesman
	case SkMndOvBo:		Timer = 16;		break; // Generic
	case SkMining:		Timer = 16;		break; // Tradesman
	case SkNightSi:		Timer = 16;		break; // Thief
	case SkObserva:		Timer = 16;		break; // Generic
	case SkPhiloso:		Timer = 16;		break; // Cleric
	case SkPickpoc:		Timer = 16;		break; // Thief
	case SkPoison:		Timer = 16;		break; // Thief
	case SkPottery:		Timer = 16;		break; // Tradesman
	case SkReadWri:		Timer = 16;		break; // Generic
	case SkRopeNet:		Timer = 16;		break; // Tradesman
	case SkSeamans:		Timer = 16;		break; // Tradesman
	case SkSeance:		Timer = 16;		break; // Generic
	case SkSkinnin:		Timer = 16;		break; // Tradesman
	case SkStealth:		Timer = 16;		break; // Thief
	case SkStonema:		Timer = 16;		break; // Tradesman
	case SkSurviva:		Timer = 16;		break; // Warrior
	case SkSwimmin:		Timer = 16;		break; // Generic
	case SkTailori:		Timer = 16;		break; // Tradesman
	case SkTrackin:		Timer = 16;		break; // Thief
	case SkTrailSk:		Timer = 16;		break; // Thief
	case SkTraps:		Timer = 16;		break; // Thief
	case SkVeterin:		Timer = 16;		break; // Tradesman
	case SkWeapSmi:		Timer = 16;		break; // Warrior
	case SkWeaving:		Timer = 16;		break; // Tradesman
	case SkWghtLif:		Timer = 16;		break; // Generic
	case SkWSBloPa:		Timer = 16;		break; // Warrior
	case SkWSDodgi:		Timer = 16;		break; // Warrior
	case SkWSPunch:		Timer = 16;		break; // Warrior
	case SkWSBrdic:		Timer = 16;		break; // Warrior
	case SkWSBstSw:		Timer = 16;		break; // Warrior
	case SkWSBatAx:		Timer = 16;		break; // Warrior
	case SkWSBLong:		Timer = 16;		break; // Warrior
	case SkWSBShor:		Timer = 16;		break; // Warrior
	case SkWSBrSwr:		Timer = 16;		break; // Warrior
	case SkWSClub:		Timer = 16;		break; // Warrior
	case SkWSCLBow:		Timer = 16;		break; // Warrior
	case SkWSCSBow:		Timer = 16;		break; // Warrior
	case SkWSCrBow:		Timer = 16;		break; // Warrior
	case SkWSDagge:		Timer = 16;		break; // Warrior
	case SkWSFlail:		Timer = 16;		break; // Warrior
	case SkWSHndAx:		Timer = 16;		break; // Warrior
	case SkWSLance:		Timer = 16;		break; // Warrior
	case SkWSLngSw:		Timer = 16;		break; // Warrior
	case SkWSMace:		Timer = 16;		break; // Warrior
	case SkWSMrnSt:		Timer = 16;		break; // Warrior
	case SkWSPick:		Timer = 16;		break; // Warrior
	case SkWSQStaf:		Timer = 16;		break; // Warrior
	case SkWSScimi:		Timer = 16;		break; // Warrior
	case SkWSScour:		Timer = 16;		break; // Warrior
	case SkWSShoSw:		Timer = 16;		break; // Warrior
	case SkWSSickl:		Timer = 16;		break; // Warrior
	case SkWSSpear:		Timer = 16;		break; // Warrior
	case SkWSTride:		Timer = 16;		break; // Warrior
	case SkWSWarHa:		Timer = 16;		break; // Warrior
	case SkWSWhip:		Timer = 16;		break; // Warrior
	}
}
const Skill& Skill::operator= (const Skill &other)
{
	if(this != &other)
	{
		Skill_ID			= other.Skill_ID;
		XP					= other.XP;
		Level				= other.Level;
		Timer				= other.Timer;
	}
	return *this;
}
const Skill* Skill::operator= (const Skill *other)
{
	if(this != other)
	{
		Skill_ID			= other->Skill_ID;
		XP					= other->XP;
		Level				= other->Level;
		Timer				= other->Timer;
	}
	return this;
}
bool Skill::operator< (const Skill& other) const
{
	if(Skill_ID < other.Skill_ID)	return true;
	else							return false;
}
bool Skill::operator== (const Skill& other) const
{
	if(Skill_ID == other.Skill_ID)	return true;
	else							return false;
}
void Skill::AssignLevel()
{
	if		(XP == LEVEL_25)	Level = 25;
	else if (XP >= LEVEL_24)	Level = 24;
	else if (XP >= LEVEL_23)	Level = 23;
	else if (XP >= LEVEL_22)	Level = 22;
	else if (XP >= LEVEL_21)	Level = 21;
	else if (XP >= LEVEL_20)	Level = 20;
	else if (XP >= LEVEL_19)	Level = 19;
	else if (XP >= LEVEL_18)	Level = 18;
	else if (XP >= LEVEL_17)	Level = 17;
	else if (XP >= LEVEL_16)	Level = 16;
	else if (XP >= LEVEL_15)	Level = 15;
	else if (XP >= LEVEL_14)	Level = 14;
	else if (XP >= LEVEL_13)	Level = 13;
	else if (XP >= LEVEL_12)	Level = 12;
	else if (XP >= LEVEL_11)	Level = 11;
	else if (XP >= LEVEL_10)	Level = 10;
	else if (XP >= LEVEL_09)	Level = 9;
	else if (XP >= LEVEL_08)	Level = 8;
	else if (XP >= LEVEL_07)	Level = 7;
	else if (XP >= LEVEL_06)	Level = 6;
	else if (XP >= LEVEL_05)	Level = 5;
	else if (XP >= LEVEL_04)	Level = 4;
	else if (XP >= LEVEL_03)	Level = 3;
	else if (XP >= LEVEL_02)	Level = 2;
	else if (XP >= LEVEL_01)	Level = 1;
	else						Level = 0;
}
int	Skill::getXPPercent()
{
	int		percentToReturn = 0;
	float	workingNumber	= 0.0;

	if		(XP == LEVEL_25)	return 100;
	else if	(XP >= LEVEL_24)	workingNumber = (float(XP) - LEVEL_24) / (LEVEL_25 - LEVEL_24);
	else if	(XP >= LEVEL_23)	workingNumber = (float(XP) - LEVEL_23) / (LEVEL_24 - LEVEL_23);
	else if	(XP >= LEVEL_22)	workingNumber = (float(XP) - LEVEL_22) / (LEVEL_23 - LEVEL_22);
	else if	(XP >= LEVEL_21)	workingNumber = (float(XP) - LEVEL_21) / (LEVEL_22 - LEVEL_21);
	else if (XP >= LEVEL_20)	workingNumber = (float(XP) - LEVEL_20) / (LEVEL_21 - LEVEL_20);
	else if (XP >= LEVEL_19)	workingNumber = (float(XP) - LEVEL_19) / (LEVEL_20 - LEVEL_19);
	else if (XP >= LEVEL_18)	workingNumber = (float(XP) - LEVEL_18) / (LEVEL_19 - LEVEL_18);
	else if (XP >= LEVEL_17)	workingNumber = (float(XP) - LEVEL_17) / (LEVEL_18 - LEVEL_17);
	else if (XP >= LEVEL_16)	workingNumber = (float(XP) - LEVEL_16) / (LEVEL_17 - LEVEL_16);
	else if (XP >= LEVEL_15)	workingNumber = (float(XP) - LEVEL_15) / (LEVEL_16 - LEVEL_15);
	else if (XP >= LEVEL_14)	workingNumber = (float(XP) - LEVEL_14) / (LEVEL_15 - LEVEL_14);
	else if (XP >= LEVEL_13)	workingNumber = (float(XP) - LEVEL_13) / (LEVEL_14 - LEVEL_13);
	else if (XP >= LEVEL_12)	workingNumber = (float(XP) - LEVEL_12) / (LEVEL_13 - LEVEL_12);
	else if (XP >= LEVEL_11)	workingNumber = (float(XP) - LEVEL_11) / (LEVEL_12 - LEVEL_11);
	else if (XP >= LEVEL_10)	workingNumber = (float(XP) - LEVEL_10) / (LEVEL_11 - LEVEL_10);
	else if (XP >= LEVEL_09)	workingNumber = (float(XP) - LEVEL_09) / (LEVEL_10 - LEVEL_09);
	else if (XP >= LEVEL_08)	workingNumber = (float(XP) - LEVEL_08) / (LEVEL_09 - LEVEL_08);
	else if (XP >= LEVEL_07)	workingNumber = (float(XP) - LEVEL_07) / (LEVEL_08 - LEVEL_07);
	else if (XP >= LEVEL_06)	workingNumber = (float(XP) - LEVEL_06) / (LEVEL_07 - LEVEL_06);
	else if (XP >= LEVEL_05)	workingNumber = (float(XP) - LEVEL_05) / (LEVEL_06 - LEVEL_05);
	else if (XP >= LEVEL_04)	workingNumber = (float(XP) - LEVEL_04) / (LEVEL_05 - LEVEL_04);
	else if (XP >= LEVEL_03)	workingNumber = (float(XP) - LEVEL_03) / (LEVEL_04 - LEVEL_03);
	else if (XP >= LEVEL_02)	workingNumber = (float(XP) - LEVEL_02) / (LEVEL_03 - LEVEL_02);
	else if (XP >= 0)			workingNumber = (float(XP) - 0) / (LEVEL_02 - 0);//no division by 0
	else						workingNumber = (float(XP) + (LEVEL_02/2)) / (LEVEL_02/2);

	workingNumber *= 100;
	percentToReturn = int(workingNumber);	
	return percentToReturn;
}
int Skill::getXPNextLvl()
{
	int tmp;
	if(Skill_ID != Sk100)
	{
		switch(Level)
		{
		case 25:	tmp = 0;					break;
		case 24:	tmp =  LEVEL_25;			break;
		case 23:	tmp =  LEVEL_24;			break;
		case 22:	tmp =  LEVEL_23;			break;
		case 21:	tmp =  LEVEL_22;			break;
		case 20:	tmp =  LEVEL_21;			break;
		case 19:	tmp =  LEVEL_20;			break;
		case 18:	tmp =  LEVEL_19;			break;
		case 17:	tmp =  LEVEL_18;			break;
		case 16:	tmp =  LEVEL_17;			break;
		case 15:	tmp =  LEVEL_16;			break;
		case 14:	tmp =  LEVEL_15;			break;
		case 13:	tmp =  LEVEL_14;			break;
		case 12:	tmp =  LEVEL_13;			break;
		case 11:	tmp =  LEVEL_12;			break;
		case 10:	tmp =  LEVEL_11;			break;
		case 9:		tmp =  LEVEL_10;			break;
		case 8:		tmp =  LEVEL_09;			break;
		case 7:		tmp =  LEVEL_08;			break;
		case 6:		tmp =  LEVEL_07;			break;
		case 5:		tmp =  LEVEL_06;			break;
		case 4:		tmp =  LEVEL_05;			break;
		case 3:		tmp =  LEVEL_04;			break;
		case 2:		tmp =  LEVEL_03;			break;
		case 1:		tmp =  LEVEL_02;			break;
		default:	tmp = int(LEVEL_02 / 2);	break;
		}
	}
	return tmp;
}
void Skill::SetXP(int i)
{
	XP = i;		
	AssignLevel();
}
int Skill::GetAssoc()
{
	int tmp;
	switch(Skill_ID)
	{
	case SkAlchemy:		tmp =  Wizard;			break;
	case SkAniTrain:	tmp =  Tradesman;		break;
	case SkBalance:		tmp =  Thief;			break;
	case SkBargain:		tmp =  General;			break;
	case SkBegging:		tmp =  Thief;			break;
	case SkB_Smith:		tmp =  Tradesman;		break;
	case SkBoatWri:		tmp =  Tradesman;		break;
	case SkBowyer:		tmp =  Tradesman;		break;
	case SkBrewing:		tmp =  Tradesman;		break;
	case SkCandle:		tmp =  Tradesman;		break;
	case SkCarpent:		tmp =  Tradesman;		break;
	case SkCartogr:		tmp =  Tradesman;		break;
	case SkCartWri:		tmp =  Tradesman;		break;
	case SkCheese:		tmp =  Tradesman;		break;
	case SkClimb:		tmp =  Thief;			break;
	case SkCooking:		tmp =  General;			break;
	case SkCraftIn:		tmp =  Tradesman;		break;
	case SkDiagnos:		tmp =  Wizard;			break;
	case SkDirSens:		tmp =  General;			break;
	case SkDisguis:		tmp =  Thief;			break;
	case SkEavesDr:		tmp =  Thief;			break;
	case SkEnduran:		tmp =  Warrior;			break;
	case SkEnginee:		tmp =  General;			break;
	case SkFarming:		tmp =  Tradesman;		break;
	case SkFieldSt:		tmp =  Wizard;			break;
	case SkFireBui:		tmp =  General;			break;
	case SkFishing:		tmp =  Tradesman;		break;
	case SkGemCutt:		tmp =  Tradesman;		break;
	case SkGeograp:		tmp =  General;			break;
	case SkGeology:		tmp =  General;			break;
	case SkHealing:		tmp =  Cleric;			break;
	case SkHerbali:		tmp =  Wizard;			break;
	case SkHiding:		tmp =  Thief;			break;
	case SkJumping:		tmp =  Thief;			break;
	case SkLeaders:		tmp =  General;			break;
	case SkLeathWo:		tmp =  Tradesman;		break;
	case SkLockPic:		tmp =  Thief;			break;
	case SkLockSmi:		tmp =  Tradesman;		break;
	case SkMeditat:		tmp =  General;			break;
	case SkMetalSm:		tmp =  Tradesman;		break;
	case SkMndOvBo:		tmp =  General;			break;
	case SkMining:		tmp =  Tradesman;		break;
	case SkNightSi:		tmp =  Thief;			break;
	case SkObserva:		tmp =  General;			break;
	case SkPhiloso:		tmp =  Cleric;			break;
	case SkPickpoc:		tmp =  Thief;			break;
	case SkPoison:		tmp =  Tradesman;		break;
	case SkPottery:		tmp =  Tradesman;		break;
	case SkReadWri:		tmp =  General;			break;
	case SkRopeNet:		tmp =  Tradesman;		break;
	case SkSeamans:		tmp =  General;			break;
	case SkSeance:		tmp =  Wizard;			break;
	case SkSkinnin:		tmp =  Tradesman;		break;
	case SkStealth:		tmp =  Thief;			break;
	case SkStonema:		tmp =  Tradesman;		break;
	case SkSurviva:		tmp =  General;			break;
	case SkSwimmin:		tmp =  General;			break;
	case SkTailori:		tmp =  Tradesman;		break;
	case SkTrackin:		tmp =  General;			break;
	case SkTrailSk:		tmp =  General;			break;
	case SkTraps:		tmp =  Thief;			break;
	case SkVeterin:		tmp =  General;			break;
	case SkWeapSmi:		tmp =  Tradesman;		break;
	case SkWeaving:		tmp =  Tradesman;		break;
	case SkWghtLif:		tmp =  General;			break;
	case SkWSBloPa:		tmp =  Warrior;			break;
	case SkWSDodgi:		tmp =  Warrior;			break;
	case SkWSPunch:		tmp =  Warrior;			break;
	case SkWSBrdic:		tmp =  Warrior;			break;
	case SkWSBstSw:		tmp =  Warrior;			break;
	case SkWSBatAx:		tmp =  Warrior;			break;
	case SkWSBLong:		tmp =  Warrior;			break;
	case SkWSBShor:		tmp =  Warrior;			break;
	case SkWSBrSwr:		tmp =  Warrior;			break;
	case SkWSClub:		tmp =  Warrior;			break;
	case SkWSCLBow:		tmp =  Warrior;			break;
	case SkWSCSBow:		tmp =  Warrior;			break;
	case SkWSCrBow:		tmp =  Warrior;			break;
	case SkWSDagge:		tmp =  Warrior;			break;
	case SkWSFlail:		tmp =  Warrior;			break;
	case SkWSHndAx:		tmp =  Warrior;			break;
	case SkWSLance:		tmp =  Warrior;			break;
	case SkWSLngSw:		tmp =  Warrior;			break;
	case SkWSMace:		tmp =  Warrior;			break;
	case SkWSMrnSt:		tmp =  Warrior;			break;
	case SkWSPick:		tmp =  Warrior;			break;
	case SkWSQStaf:		tmp =  Warrior;			break;
	case SkWSScimi:		tmp =  Warrior;			break;
	case SkWSScour:		tmp =  Warrior;			break;
	case SkWSShoSw:		tmp =  Warrior;			break;
	case SkWSSickl:		tmp =  Warrior;			break;
	case SkWSSpear:		tmp =  Warrior;			break;
	case SkWSTride:		tmp =  Warrior;			break;
	case SkWSWarHa:		tmp =  Warrior;			break;
	case SkWSWhip:		tmp =  Warrior;			break;
	default:			tmp =  -1;				break;
	};

	return tmp;
}
int Skill::GetAssocByRef(int i)
{
	int R = -1;

	switch(i)
	{
	case SkAlchemy:		R =  Wizard;		break;
	case SkAniTrain:	R =  Tradesman;		break;
	case SkBalance:		R =  Thief;			break;
	case SkBargain:		R =  General;		break;
	case SkBegging:		R =  Thief;			break;
	case SkB_Smith:		R =  Tradesman;		break;
	case SkBoatWri:		R =  Tradesman;		break;
	case SkBowyer:		R =  Tradesman;		break;
	case SkBrewing:		R =  Tradesman;		break;
	case SkCandle:		R =  Tradesman;		break;
	case SkCarpent:		R =  Tradesman;		break;
	case SkCartogr:		R =  Tradesman;		break;
	case SkCartWri:		R =  Tradesman;		break;
	case SkCheese:		R =  Tradesman;		break;
	case SkClimb:		R =  Thief;			break;
	case SkCooking:		R =  General;		break;
	case SkCraftIn:		R =  Tradesman;		break;
	case SkDiagnos:		R =  Wizard;		break;
	case SkDirSens:		R =  General;		break;
	case SkDisguis:		R =  Thief;			break;
	case SkEavesDr:		R =  Thief;			break;
	case SkEnduran:		R =  Warrior;		break;
	case SkEnginee:		R =  General;		break;
	case SkFarming:		R =  Tradesman;		break;
	case SkFieldSt:		R =  Wizard;		break;
	case SkFireBui:		R =  General;		break;
	case SkFishing:		R =  Tradesman;		break;
	case SkGemCutt:		R =  Tradesman;		break;
	case SkGeograp:		R =  General;		break;
	case SkGeology:		R =  General;		break;
	case SkHealing:		R =  Cleric;		break;
	case SkHerbali:		R =  Wizard;		break;
	case SkHiding:		R =  Thief;			break;
	case SkJumping:		R =  Thief;			break;
	case SkLeaders:		R =  General;		break;
	case SkLeathWo:		R =  Tradesman;		break;
	case SkLockPic:		R =  Thief;			break;
	case SkLockSmi:		R =  Tradesman;		break;
	case SkMeditat:		R =  General;		break;
	case SkMetalSm:		R =  Tradesman;		break;
	case SkMndOvBo:		R =  General;		break;
	case SkMining:		R =  Tradesman;		break;
	case SkNightSi:		R =  Thief;			break;
	case SkObserva:		R =  General;		break;
	case SkPhiloso:		R =  Cleric;		break;
	case SkPickpoc:		R =  Thief;			break;
	case SkPoison:		R =  Tradesman;		break;
	case SkPottery:		R =  Tradesman;		break;
	case SkReadWri:		R =  General;		break;
	case SkRopeNet:		R =  Tradesman;		break;
	case SkSeamans:		R =  General;		break;
	case SkSeance:		R =  Wizard;		break;
	case SkSkinnin:		R =  Tradesman;		break;
	case SkStealth:		R =  Thief;			break;
	case SkStonema:		R =  Tradesman;		break;
	case SkSurviva:		R =  General;		break;
	case SkSwimmin:		R =  General;		break;
	case SkTailori:		R =  Tradesman;		break;
	case SkTrackin:		R =  General;		break;
	case SkTrailSk:		R =  General;		break;
	case SkTraps:		R =  Thief;			break;
	case SkVeterin:		R =  General;		break;
	case SkWeapSmi:		R =  Tradesman;		break;
	case SkWeaving:		R =  Tradesman;		break;
	case SkWghtLif:		R =  General;		break;
	case SkWSBloPa:		R =  Warrior;		break;
	case SkWSDodgi:		R =  Warrior;		break;
	case SkWSPunch:		R =  Warrior;		break;
	case SkWSBrdic:		R =  Warrior;		break;
	case SkWSBstSw:		R =  Warrior;		break;
	case SkWSBatAx:		R =  Warrior;		break;
	case SkWSBLong:		R =  Warrior;		break;
	case SkWSBShor:		R =  Warrior;		break;
	case SkWSBrSwr:		R =  Warrior;		break;
	case SkWSClub:		R =  Warrior;		break;
	case SkWSCLBow:		R =  Warrior;		break;
	case SkWSCSBow:		R =  Warrior;		break;
	case SkWSCrBow:		R =  Warrior;		break;
	case SkWSDagge:		R =  Warrior;		break;
	case SkWSFlail:		R =  Warrior;		break;
	case SkWSHndAx:		R =  Warrior;		break;
	case SkWSLance:		R =  Warrior;		break;
	case SkWSLngSw:		R =  Warrior;		break;
	case SkWSMace:		R =  Warrior;		break;
	case SkWSMrnSt:		R =  Warrior;		break;
	case SkWSPick:		R =  Warrior;		break;
	case SkWSQStaf:		R =  Warrior;		break;
	case SkWSScimi:		R =  Warrior;		break;
	case SkWSScour:		R =  Warrior;		break;
	case SkWSShoSw:		R =  Warrior;		break;
	case SkWSSickl:		R =  Warrior;		break;
	case SkWSSpear:		R =  Warrior;		break;
	case SkWSTride:		R =  Warrior;		break;
	case SkWSWarHa:		R =  Warrior;		break;
	case SkWSWhip:		R =  Warrior;		break;
	default:			R =  -1;			break;
	};
	return R;
}
string Skill::getUserSkillName()
{
	string tmp;

	switch(Skill_ID)
	{
	case SkAlchemy:		tmp = "Alchemy";				break;
	case SkAniTrain:	tmp = "Animal training";		break;
	case SkBalance:		tmp = "Balance";				break;
	case SkBargain:		tmp =  "Bargaining";			break;
	case SkBegging:		tmp =  "Begging";				break;
	case SkB_Smith:		tmp =  "Blacksmithing";			break;
	case SkBoatWri:		tmp =  "Boatwright";			break;
	case SkBowyer:		tmp =  "Bowyer";				break;
	case SkBrewing:		tmp =  "Brewing";				break;
	case SkCandle:		tmp =  "Candle making";			break;
	case SkCarpent:		tmp =  "Carpentry";				break;
	case SkCartogr:		tmp =  "Cartography";			break;
	case SkCartWri:		tmp =  "Cartwright";			break;
	case SkCheese:		tmp =  "Cheese making";			break;
	case SkClimb:		tmp =  "Climbing";				break;
	case SkCooking:		tmp =  "Cooking";				break;
	case SkCraftIn:		tmp =  "Craft instrument";		break;
	case SkDiagnos:		tmp =  "Diagnostics";			break;
	case SkDirSens:		tmp =  "Direction sense";		break;
	case SkDisguis:		tmp =  "Disguise";				break;
	case SkEavesDr:		tmp =  "Eavesdropping";			break;
	case SkEnduran:		tmp =  "Endurance";				break;
	case SkEnginee:		tmp =  "Engineering";			break;
	case SkFarming:		tmp =  "Farming";				break;
	case SkFieldSt:		tmp =  "Field of studies";		break;
	case SkFireBui:		tmp =  "Fire building";			break;
	case SkFishing:		tmp =  "Fishing";				break;
	case SkGemCutt:		tmp =  "Gem cutting";			break;
	case SkGeograp:		tmp =  "Geography";				break;
	case SkGeology:		tmp =  "Geology";				break;
	case SkHealing:		tmp =  "Healing";				break;
	case SkHerbali:		tmp =  "Herbalism";				break;
	case SkHiding:		tmp =  "Hiding";				break;
	case SkJumping:		tmp =  "Jumping";				break;
	case SkLeaders:		tmp =  "Leadership";			break;
	case SkLeathWo:		tmp =  "Leatherworking";		break;
	case SkLockPic:		tmp =  "Lock picking";			break;
	case SkLockSmi:		tmp =  "Locksmithing";			break;
	case SkMeditat:		tmp =  "Meditation";			break;
	case SkMetalSm:		tmp =  "Metal Smithing";		break;
	case SkMndOvBo:		tmp =  "Mind over body";		break;
	case SkMining:		tmp =  "Mining";				break;
	case SkNightSi:		tmp =  "Night sight";			break;
	case SkObserva:		tmp =  "Observation";			break;
	case SkPhiloso:		tmp =  "Philosophy";			break;
	case SkPickpoc:		tmp =  "Pickpocket";			break;
	case SkPoison:		tmp =  "Poison";				break;
	case SkPottery:		tmp =  "Pottery";				break;
	case SkReadWri:		tmp =  "Read and Write";		break;
	case SkRopeNet:		tmp =  "Rope/Net making";		break;
	case SkRunning:		tmp =  "Running";				break;
	case SkSeamans:		tmp =  "Seamanship";			break;
	case SkSeance:		tmp =  "Séance";				break;
	case SkSkinnin:		tmp =  "Skinning";				break;
	case SkStealth:		tmp =  "Stealth";				break;
	case SkStonema:		tmp =  "Stonemasonry";			break;
	case SkSurviva:		tmp =  "Survival";				break;
	case SkSwimmin:		tmp =  "Swimming";				break;
	case SkTailori:		tmp =  "Tailoring";				break;
	case SkTrackin:		tmp =  "Tracking";				break;
	case SkTrailSk:		tmp =  "Trail Skills";			break;
	case SkTraps:		tmp =  "Traps";					break;
	case SkVeterin:		tmp =  "Veterinarian";			break;
	case SkWeapSmi:		tmp =  "Weapon smith";			break;
	case SkWeaving:		tmp =  "Weaving";				break;
	case SkWghtLif:		tmp =  "Weight Lifting";		break;
	case SkWSBloPa:		tmp =  "WS-Block/Parry";		break;
	case SkWSDodgi:		tmp =  "WS-Dodging";			break;
	case SkWSPunch:		tmp =  "WS-Punching";			break;
	case SkWSBrdic:		tmp =  "WS-Bardiche";			break;
	case SkWSBstSw:		tmp =  "WS-Bastard Sword";		break;
	case SkWSBatAx:		tmp =  "WS-Battle Axe";			break;
	case SkWSBLong:		tmp =  "WS-Bow, Long";			break;
	case SkWSBShor:		tmp =  "WS-Bow, Short";			break;
	case SkWSBrSwr:		tmp =  "WS-Broad Sword";		break;
	case SkWSClub:		tmp =  "WS-Club";				break;
	case SkWSCLBow:		tmp =  "WS-Comp Long Bow";		break;
	case SkWSCSBow:		tmp =  "WS-Comp Short Bow";		break;
	case SkWSCrBow:		tmp =  "WS-Crossbow";			break;
	case SkWSDagge:		tmp =  "WS-Dagger";				break;
	case SkWSFlail:		tmp =  "WS-Flail";				break;
	case SkWSHndAx:		tmp =  "WS-Hand Axe";			break;
	case SkWSLance:		tmp =  "WS-Lance";				break;
	case SkWSLngSw:		tmp =  "WS-Long Sword";			break;
	case SkWSMace:		tmp =  "WS-Mace";				break;
	case SkWSMrnSt:		tmp =  "WS-Morning star";		break;
	case SkWSPick:		tmp =  "WS-Pick";				break;
	case SkWSQStaf:		tmp =  "WS-Quarterstaff";		break;
	case SkWSScimi:		tmp =  "WS-Scimitar";			break;
	case SkWSScour:		tmp =  "WS-Scourge";			break;
	case SkWSShoSw:		tmp =  "WS-Short Sword";		break;
	case SkWSSickl:		tmp =  "WS-Sickle";				break;
	case SkWSSpear:		tmp =  "WS-Spear";				break;
	case SkWSTride:		tmp =  "WS-Trident";			break;
	case SkWSWarHa:		tmp =  "WS-Warhammer";			break;
	case SkWSWhip:		tmp =  "WS-Whip";				break;
	default:			tmp =  "Skill Error";			break;
	}

	return tmp;
}
string Skill::getUserSkillName(int i)
{
	string tmp;

	switch(i)
	{
	case SkAlchemy:		tmp = "Alchemy";			break;
	case SkAniTrain:	tmp = "Animal training";	break;
	case SkBalance:		tmp = "Balance";			break;
	case SkBargain:		tmp = "Bargaining";			break;
	case SkBegging:		tmp = "Begging";			break;
	case SkB_Smith:		tmp = "Blacksmithing";		break;
	case SkBoatWri:		tmp = "Boatwright";			break;
	case SkBowyer:		tmp = "Bowyer";				break;
	case SkBrewing:		tmp = "Brewing";			break;
	case SkCandle:		tmp = "Candle making";		break;
	case SkCarpent:		tmp = "Carpentry";			break;
	case SkCartogr:		tmp = "Cartography";		break;
	case SkCartWri:		tmp = "Cartwright";			break;
	case SkCheese:		tmp = "Cheese making";		break;
	case SkClimb:		tmp = "Climbing";			break;
	case SkCooking:		tmp = "Cooking";			break;
	case SkCraftIn:		tmp = "Craft instrument";	break;
	case SkDiagnos:		tmp = "Diagnostics";		break;
	case SkDirSens:		tmp = "Direction sense";	break;
	case SkDisguis:		tmp = "Disguise";			break;
	case SkEavesDr:		tmp = "Eavesdropping";		break;
	case SkEnduran:		tmp = "Endurance";			break;
	case SkEnginee:		tmp = "Engineering";		break;
	case SkFarming:		tmp = "Farming";			break;
	case SkFieldSt:		tmp = "Field of studies";	break;
	case SkFireBui:		tmp = "Fire building";		break;
	case SkFishing:		tmp = "Fishing";			break;
	case SkGemCutt:		tmp = "Gem cutting";		break;
	case SkGeograp:		tmp = "Geography";			break;
	case SkGeology:		tmp = "Geology";			break;
	case SkHealing:		tmp = "Healing";			break;
	case SkHerbali:		tmp = "Herbalism";			break;
	case SkHiding:		tmp = "Hiding";				break;
	case SkJumping:		tmp = "Jumping";			break;
	case SkLeaders:		tmp = "Leadership";			break;
	case SkLeathWo:		tmp = "Leatherworking";		break;
	case SkLockPic:		tmp = "Lock picking";		break;
	case SkLockSmi:		tmp = "Locksmithing";		break;
	case SkMeditat:		tmp = "Meditation";			break;
	case SkMetalSm:		tmp = "Metal Smithing";		break;
	case SkMndOvBo:		tmp = "Mind over body";		break;
	case SkMining:		tmp = "Mining";				break;
	case SkNightSi:		tmp = "Night sight";		break;
	case SkObserva:		tmp = "Observation";		break;
	case SkPhiloso:		tmp = "Philosophy";			break;
	case SkPickpoc:		tmp = "Pickpocket";			break;
	case SkPoison:		tmp = "Poison";				break;
	case SkPottery:		tmp = "Pottery";			break;
	case SkReadWri:		tmp = "Read and Write";		break;
	case SkRopeNet:		tmp = "Rope/Net making";	break;
	case SkRunning:		tmp = "Running";			break;
	case SkSeamans:		tmp = "Seamanship";			break;
	case SkSeance:		tmp = "Séance";				break;
	case SkSkinnin:		tmp = "Skinning";			break;
	case SkStealth:		tmp = "Stealth";			break;
	case SkStonema:		tmp = "Stonemasonry";		break;
	case SkSurviva:		tmp = "Survival";			break;
	case SkSwimmin:		tmp = "Swimming";			break;
	case SkTailori:		tmp = "Tailoring";			break;
	case SkTrackin:		tmp = "Tracking";			break;
	case SkTrailSk:		tmp = "Trail Skills";		break;
	case SkTraps:		tmp = "Traps";				break;
	case SkVeterin:		tmp = "Veterinarian";		break;
	case SkWeapSmi:		tmp = "Weapon smith";		break;
	case SkWeaving:		tmp = "Weaving";			break;
	case SkWghtLif:		tmp = "Weight Lifting";		break;
	case SkWSBloPa:		tmp = "WS-Block/Parry";		break;
	case SkWSDodgi:		tmp = "WS-Dodging";			break;
	case SkWSPunch:		tmp = "WS-Punching";		break;
	case SkWSBrdic:		tmp = "WS-Bardiche";		break;
	case SkWSBstSw:		tmp = "WS-Bastard Sword";	break;
	case SkWSBatAx:		tmp = "WS-Battle Axe";		break;
	case SkWSBLong:		tmp = "WS-Bow, Long";		break;
	case SkWSBShor:		tmp = "WS-Bow, Short";		break;
	case SkWSBrSwr:		tmp = "WS-Broad Sword";		break;
	case SkWSClub:		tmp = "WS-Club";			break;
	case SkWSCLBow:		tmp = "WS-Comp Long Bow";	break;
	case SkWSCSBow:		tmp = "WS-Comp Short Bow";	break;
	case SkWSCrBow:		tmp = "WS-Crossbow";		break;
	case SkWSDagge:		tmp = "WS-Dagger";			break;
	case SkWSFlail:		tmp = "WS-Flail";			break;
	case SkWSHndAx:		tmp = "WS-Hand Axe";		break;
	case SkWSLance:		tmp = "WS-Lance";			break;
	case SkWSLngSw:		tmp = "WS-Long Sword";		break;
	case SkWSMace:		tmp = "WS-Mace";			break;
	case SkWSMrnSt:		tmp = "WS-Morning star";	break;
	case SkWSPick:		tmp = "WS-Pick";			break;
	case SkWSQStaf:		tmp = "WS-Quarterstaff";	break;
	case SkWSScimi:		tmp = "WS-Scimitar";		break;
	case SkWSScour:		tmp = "WS-Scourge";			break;
	case SkWSShoSw:		tmp = "WS-Short Sword";		break;
	case SkWSSickl:		tmp = "WS-Sickle";			break;
	case SkWSSpear:		tmp = "WS-Spear";			break;
	case SkWSTride:		tmp = "WS-Trident";			break;
	case SkWSWarHa:		tmp = "WS-Warhammer";		break;
	case SkWSWhip:		tmp = "WS-Whip";			break;
	default:			tmp = "Skill Error";		break;
	}

	return tmp;
}
string Skill::getSkillStrID(int i)
{
	return "Error";
}