Esempio n. 1
0
		private bool _tryLoadClasses(string fileName = null)
		{
			try
			{
				m_classes = string.IsNullOrEmpty(fileName) ? new ClassFile() : new ClassFile(fileName);
			}
			catch
			{
				m_classes = null;
				return false;
			}

			return true;
		}
		private static bool _isPubValid(InitFileType fileType)
		{
			try
			{
				EODataFile file;
				switch (fileType)
				{
					case InitFileType.Item:
						file = new ItemFile();
						break;
					case InitFileType.Npc:
						file = new NPCFile();
						break;
					case InitFileType.Spell:
						file = new SpellFile();
						break;
					case InitFileType.Class:
						file = new ClassFile();
						break;
					default:
						return false;
				}

				if (file.Data.Count <= 1) return false;
			}
			catch
			{
				return false;
			}

			return true;
		}