public void DBUpdateQuests(List<Quest> quests)
	{
		if(quests==null)
			quests=new Vector<Quest>();
		String quType="DefaultQuest";
		if(quests.size()>0)
			quType=CMClass.classID(quests.get(0));
		DBConnection D=null;
		DB.update("DELETE FROM CMQUESTS WHERE CMQUTYPE='"+quType+"'");
		CMLib.s_sleep((1000+(quests.size()*100)));
		if(DB.queryRows("SELECT * FROM CMQUESTS WHERE CMQUTYPE='"+quType+"'")>0)
			Log.errOut("Failed to delete quest typed '"+quType+"'.");
		DB.update("DELETE FROM CMQUESTS WHERE CMQUTYPE='Quests'");
		CMLib.s_sleep((1000+(quests.size()*100)));
		if(DB.queryRows("SELECT * FROM CMQUESTS WHERE CMQUTYPE='Quests'")>0)
			Log.errOut("Failed to delete quest typed 'Quests'.");
		D=DB.DBFetchEmpty();
		for(int m=0;m<quests.size();m++)
		{
			final Quest Q=quests.get(m);
			if(Q.isCopy())
				continue;
			try
			{
				D.rePrepare(
				"INSERT INTO CMQUESTS ("
				+"CMQUESID, "
				+"CMQUTYPE, "
				+"CMQFLAGS, "
				+"CMQSCRPT, "
				+"CMQWINNS "
				+") values ("
				+"'"+Q.name()+"',"
				+"'"+CMClass.classID(Q)+"',"
				+Q.getFlags()+","
				+"?,"
				+"?"
				+")");
				D.setPreparedClobs(new String[]{Q.script()+" ",Q.getWinnerStr()+" "});
				D.update("",0);
			}
			catch(final java.sql.SQLException sqle)
			{
				Log.errOut("Quest",sqle);
			}
		}
		if(D!=null)
			DB.DBDone(D);
	}