示例#1
0
int main(int argc, char* arg[])
{
    printf("Map & DBC Extractor\n");
    printf("===================\n\n");

    HandleArgs(argc, arg);

    // Open MPQs
    LoadCommonMPQFiles();

    // Extract dbc
    if (CONF_extract & EXTRACT_DBC)
        ExtractDBCFiles();

    if (CONF_extract & EXTRACT_CAMERA)
        ExtractCameraFiles();

    // Extract maps
    if (CONF_extract & EXTRACT_MAP)
        ExtractMapsFromMpq();

    // Close MPQs
    CloseMPQFiles();

    return 0;
}
示例#2
0
int main(int argc, char * arg[])
{
    printf("Map & DBC Extractor\n");
    printf("===================\n\n");

    HandleArgs(argc, arg);

    uint32 build = 0;

    // Open MPQs
    LoadCommonMPQFiles();

    if (CONF_extract & EXTRACT_DBC)
    {
        // Extract DBC Files.
        ExtractDBCFiles();
    }

    if (CONF_extract & EXTRACT_MAP)
    {
        printf("Loading files.. \n");

        // Extract maps
        ExtractMapsFromMpq(build);
    }

    // Close MPQs
    CloseMPQFiles();

    return 0;
}
示例#3
0
文件: System.cpp 项目: 0jpq0/server
/**
 * @brief
 *
 * @param argc
 * @param argv
 * @return int
 */
int main(int argc, char** argv)
{
    printf("mangos-zero DBC & map (version %s) extractor\n\n", MAP_VERSION_MAGIC);

    if (!HandleArgs(argc, argv))
    {
        return 1;
    }

    // Open MPQs
    LoadCommonMPQFiles();

    // Extract dbc
    if (CONF_extract & EXTRACT_DBC)
        { ExtractDBCFiles(); }

    // Extract maps
    if (CONF_extract & EXTRACT_MAP)
        { ExtractMapsFromMpq(); }

    // Close MPQs
    CloseMPQFiles();

    return 0;
}
示例#4
0
int main(int argc, char * arg[])
{
    printf("Map & DBC Extractor\n");
    printf("===================\n\n");

    HandleArgs(argc, arg);

    int FirstLocale = -1;

    for (int i = 0; i < LANG_COUNT; i++)
    {
        char tmp1[512];
        sprintf(tmp1, "%s/Data/%s/locale-%s.MPQ", input_path, langs[i], langs[i]);
        if (FileExists(tmp1))
        {
            printf("Detected locale: %s\n", langs[i]);

            //Open MPQs
            LoadLocaleMPQFiles(i);

            if((extract & EXTRACT_DBC) == 0)
            {
                FirstLocale = i;
                break;
            }

            //Extract DBC files
            if(FirstLocale < 0)
            {
                ExtractDBCFiles(i, true);
                FirstLocale = i;
            }
            else
                ExtractDBCFiles(i, false);

            //Close MPQs
            CloseMPQFiles();
        }
    }

    if(FirstLocale < 0)
    {
        printf("No locales detected\n");
        return 0;
    }

    if (extract & EXTRACT_MAP)
    {
        printf("Using locale: %s\n", langs[FirstLocale]);

        // Open MPQs
        LoadLocaleMPQFiles(FirstLocale);
        LoadCommonMPQFiles();

        // Extract maps
        ExtractMapsFromMpq();

        // Close MPQs
        CloseMPQFiles();
    }

    return 0;
}
示例#5
0
int main(int argc, char * arg[])
{
    printf("Map & DBC Extractor\n");
    printf("===================\n\n");

    HandleArgs(argc, arg);

    int FirstLocale = -1;
    uint32 build = 0;

    for (int i = 0; i < LANG_COUNT; i++)
    {
        std::string filename = Trinity::StringFormat("%s/Data/%s/locale-%s.MPQ", input_path, langs[i], langs[i]);
        if (boost::filesystem::exists(filename))
        {
            printf("Detected locale: %s\n", langs[i]);

            //Open MPQs
            LoadLocaleMPQFiles(i);

            if((CONF_extract & EXTRACT_DBC) == 0)
            {
                FirstLocale = i;
                build = ReadBuild(FirstLocale);
                printf("Detected client build: %u\n", build);
                break;
            }

            //Extract DBC files
            if(FirstLocale < 0)
            {
                FirstLocale = i;
                build = ReadBuild(FirstLocale);
                printf("Detected client build: %u\n", build);
                ExtractDBCFiles(i, true);
            }
            else
                ExtractDBCFiles(i, false);

            //Close MPQs
            CloseMPQFiles();
        }
    }

    if(FirstLocale < 0)
    {
        printf("No locales detected\n");
        return 0;
    }

    if (CONF_extract & EXTRACT_CAMERA)
    {
        printf("Using locale: %s\n", langs[FirstLocale]);

        // Open MPQs
        LoadLocaleMPQFiles(FirstLocale);
        LoadCommonMPQFiles();

        ExtractCameraFiles(FirstLocale, true);
        // Close MPQs
        CloseMPQFiles();
    }

    if (CONF_extract & EXTRACT_MAP)
    {
        printf("Using locale: %s\n", langs[FirstLocale]);

        // Open MPQs
        LoadLocaleMPQFiles(FirstLocale);
        LoadCommonMPQFiles();

        // Extract maps
        ExtractMapsFromMpq(build);

        // Close MPQs
        CloseMPQFiles();
    }

    return 0;
}