antiblock
Rodnia | Alpha & Omega
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
Sign in to follow this  
TMoore

[Metin2] Db Com E Sem Txt

13 posts in this topic

Ficheiro Main.cpp

 

Procurar por:

 

BOOL g_test_server = false;

 

e adicionar isto em baixo:

 

 
bool g_bTxtStartup = false;
 
Ficando assim:

Imagem colocada

 
 
Procurar pelo função  
 
int iDisableHotBackup;
 
e adicionar esta no final:
 
 

int iDisableTxtStartup;
if (CConfig::instance().GetValue("TXT_STARTUP", &iDisableTxtStartup))
{
    if (iDisableTxtStartup)
    {
        sys_log(0, "CONFIG: DISABLE TXT_STARTUP");
        g_bTxtStartup = true;
    }
}

 
Ficando assim:
 

Imagem colocada

 
 
Gravar o main.cpp
 
 
 
 
 
Ficheiro ClientManagerBoot.cpp
 
Procurar por:
 
extern int g_test_server;
 
adicionar este por baixo:
 
extern bool g_bTxtStartup;
 
Procurar isto:

 
if (!InitializeMobTable())
{
    sys_err("InitializeMobTable FAILED");
    return false;
}
if (!MirrorMobTableIntoDB())
{
    sys_err("MirrorMobTableIntoDB FAILED");
    return false; 
}
 
if (!InitializeItemTable())
{
    sys_err("InitializeItemTable FAILED");
    return false; 
}
 
if (!MirrorItemTableIntoDB())
{
    sys_err("MirrorItemTableIntoDB FAILED");
    return false; 
}

 
e substituir por:
 

 
if (g_bTxtStartup)
{
    if (!MirrorMobTableIntoDB())
    {
        sys_err("MirrorMobTableIntoDB FAILED");
        return false;
    }
    if (!MirrorItemTableIntoDB())
    {
        sys_err("MirrorItemTableIntoDB FAILED");
        return false;
    }
}
else
{
    if (!InitializeMobTable())
    {
        sys_err("InitializeMobTable FAILED");
        return false;
    }
    if (!InitializeItemTable())
    {
        sys_err("InitializeItemTable FAILED");
        return false;
    }
}

 
 
ficando assim:

Imagem colocada

 

 

 

Conf.txt

TXT_STARTUP = 1      // carrega dos txt

TXT_STARTUP = 0     // carrega do sql

 

 

Fonte: Metin2Dev

DB pré-compilada para download aqui

Edited by TMoore (see edit history)

Share this post


Link to post
Share on other sites
antiblock
diamwall

100% Funcional? +1

Share this post


Link to post
Share on other sites

Comigo está a funcionar na perfeição.

Meti uma db original (apenas com essa alteração) para quem não não consiga compilar.

Share this post


Link to post
Share on other sites

Isto loga, mas continua ir buscar os .txt

 

Imagem colocada

Share this post


Link to post
Share on other sites

Mas não os utiliza :)

Experimenta alterações só no sql e verifica

Share this post


Link to post
Share on other sites

Fica igual o item.

Share this post


Link to post
Share on other sites

Qual foi a branch que usaste para compilar?

Share this post


Link to post
Share on other sites

Para o game só costumam usar a mainline_released (mainline_sg)...

Share this post


Link to post
Share on other sites

Para o game só costumam usar a mainline_released (mainline_sg)...

E a db?

Share this post


Link to post
Share on other sites

foi usada a mainline_sg da vanilla

Share this post


Link to post
Share on other sites

Algum de vós que tenha conseguido fazer com que a db leia o sql em vez dos txte que não tenha feito grandes ou nenhuma alteração me consegue enviar a folder da db?

Share this post


Link to post
Share on other sites

alguém tem o  clientmanagerboot.cpp usado neste tutorial para ler a database em vez dos txt? tento baixar e já não se encontra disponível! se alguém conseguir fazer novo upload ficava eternamente grato! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this