Пример #1
0
int read_homunculusdb(void)
{
	int i;
	const char *filename[]={"homunculus_db.txt","homunculus_db2.txt"};

	memset(homunculus_db,0,sizeof(homunculus_db));

	if (!db_use_sqldbs)
	{
		for(i = 0; i<ARRAYLENGTH(filename); i++)
		{
			char path[256];

			if( i > 0 )
			{
				sprintf(path, "%s/%s", db_path, filename[i]);

				if( !exists(path) )
				{
					continue;
				}
			}

			sv_readdb(db_path, filename[i], ',', 50, 50, MAX_HOMUNCULUS_CLASS, &read_homunculusdb_sub);
		}
	}
	else
	{
		sv_readsqldb(homunculus_db_db, homunculus_db2_db, 50, MAX_HOMUNCULUS_CLASS, &read_homunculusdb_sub);
	}

	return 0;
}
Пример #2
0
int read_mercenarydb(void)
{
    memset(mercenary_db,0,sizeof(mercenary_db));
    sv_readsqldb(get_database_name(17), NULL, 26, MAX_MERCENARY_CLASS, &read_mercenarydb_sub);

    return 0;
}
Пример #3
0
int read_homunculus_skilldb(void)
{
	memset(hskill_tree,0,sizeof(hskill_tree));
	if (db_use_sqldbs)
	{
		sv_readsqldb(homun_skill_tree_db, NULL, 13, -1, &read_homunculus_skilldb_sub);
	}
	else
	{
		sv_readdb(db_path, "homun_skill_tree.txt", ',', 13, 14, -1, &read_homunculus_skilldb_sub);
	}
	return 0;
}
Пример #4
0
int read_mercenary_skilldb(void)
{
    sv_readsqldb(get_database_name(18), NULL, 3, -1, &read_mercenary_skilldb_sub);
    return 0;
}