Problema Strigat

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Avatar utilizator
Titan
Metin Master

Metin Master
Mesaje: 2783
Membru din: 01 Iun 2015, 15:09
Server: In curand.
Regat: Chunjo
Aprecieri: 42  
Mulţumiri: 377  
  Rezolvări prob.: 3
Discord: Copiază ID
 Contact:
Medalii

metin21 scrie:
Pongo A.K.A Titan scrie:
Deschide game/src/empire_text_convert.cpp
cauta
void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct)
{
    if (dwEmpireID < 1 || dwEmpireID > 3 || len == 0)
        return;

    const STextConvertTable& rkTextConvTable = g_aTextConvTable[dwEmpireID - 1];

    for (BYTE* pbText = reinterpret_cast<BYTE*>(szText) ; len > 0 && *pbText != '\0' ; --len, ++pbText)
    {
        if (number(1,100) > iPct)
        {
            if (*pbText & 0x80)
            {
                if (g_iUseLocale)
                {
                    static char s_cChinaTable[][3] = {"?n","LL","L¤","?u","?d" };
                    int n = number(0, 4);
                    pbText[0] = s_cChinaTable[n][0];
                    pbText[1] = s_cChinaTable[n][1];
                }
                else
                {
                    if (pbText[0] >= 0xB0 && pbText[0] <= 0xC8 && pbText[1] >= 0xA1 && pbText[1] <= 0xFE)
                    {
                        UINT uHanPos = (pbText[0] - 0xB0) * (0xFE - 0xA1 + 1) + (pbText[1] - 0xA1);
                        pbText[0] = rkTextConvTable.aacHan[uHanPos][0];
                        pbText[1] = rkTextConvTable.aacHan[uHanPos][1];
                    }
                    else if ( pbText[0] == 0xA4 )
                    {
                        if ( pbText[1] >=0xA1 && pbText[1] <= 0xBE )
                        {
                            pbText[0] = rkTextConvTable.aacJaum[pbText[1]-0xA1][0];
                            pbText[1] = rkTextConvTable.aacJaum[pbText[1]-0xA1][1];
                        }
                        else if ( pbText[1] >= 0xBF && pbText[1] <= 0xD3 )
                        {
                            pbText[0] = rkTextConvTable.aacMoum[pbText[1]-0xBF][0];
                            pbText[1] = rkTextConvTable.aacMoum[pbText[1]-0xBF][1];
                        }
                    }
                }

                ++pbText;
                --len;
            }
            else
            {
                if (*pbText >= 'a' && *pbText <= 'z')
                {
                    *pbText = rkTextConvTable.acLower[*pbText - 'a'];
                }
                else if (*pbText >= 'A' && *pbText <= 'Z')
                {
                    *pbText = rkTextConvTable.acUpper[*pbText - 'A'];
                }
            }
        }
        else
        {
            if (*pbText & 0x80)
            {
                ++pbText;
                --len;
            }
        }
    }
}
si modifica in
void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct)
{
    szText;
}
Am testat, Dar tot nu merge...
of doamne.. mari helperi, din nou nici nu ați înțeles ce a vrut omul să spună! :((

Mergi în sursa game, deschide input_p2p.cpp și caută:

Cod: Selectaţi tot

if (!d->GetCharacter() || (d->GetCharacter()->GetGMLevel() == GM_PLAYER && d->GetEmpire() != m_bEmpire))
Înlocuiește cu:

Cod: Selectaţi tot

if (!d->GetCharacter())
Pentru acest mesaj, Titan for the post:
metin21
Imagine
Afișează semnătura
Avatar utilizator
metin21
Nivel 2

Nivel 2
Mesaje: 249
Membru din: 24 Aug 2016, 21:11
Server: metin2
Aprecieri: 50  
Mulţumiri: 4  
Medalii

eXplode scrie:
metin21 scrie:
Pongo A.K.A Titan scrie:
Deschide game/src/empire_text_convert.cpp
cauta
void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct)
{
    if (dwEmpireID < 1 || dwEmpireID > 3 || len == 0)
        return;

    const STextConvertTable& rkTextConvTable = g_aTextConvTable[dwEmpireID - 1];

    for (BYTE* pbText = reinterpret_cast<BYTE*>(szText) ; len > 0 && *pbText != '\0' ; --len, ++pbText)
    {
        if (number(1,100) > iPct)
        {
            if (*pbText & 0x80)
            {
                if (g_iUseLocale)
                {
                    static char s_cChinaTable[][3] = {"?n","LL","L¤","?u","?d" };
                    int n = number(0, 4);
                    pbText[0] = s_cChinaTable[n][0];
                    pbText[1] = s_cChinaTable[n][1];
                }
                else
                {
                    if (pbText[0] >= 0xB0 && pbText[0] <= 0xC8 && pbText[1] >= 0xA1 && pbText[1] <= 0xFE)
                    {
                        UINT uHanPos = (pbText[0] - 0xB0) * (0xFE - 0xA1 + 1) + (pbText[1] - 0xA1);
                        pbText[0] = rkTextConvTable.aacHan[uHanPos][0];
                        pbText[1] = rkTextConvTable.aacHan[uHanPos][1];
                    }
                    else if ( pbText[0] == 0xA4 )
                    {
                        if ( pbText[1] >=0xA1 && pbText[1] <= 0xBE )
                        {
                            pbText[0] = rkTextConvTable.aacJaum[pbText[1]-0xA1][0];
                            pbText[1] = rkTextConvTable.aacJaum[pbText[1]-0xA1][1];
                        }
                        else if ( pbText[1] >= 0xBF && pbText[1] <= 0xD3 )
                        {
                            pbText[0] = rkTextConvTable.aacMoum[pbText[1]-0xBF][0];
                            pbText[1] = rkTextConvTable.aacMoum[pbText[1]-0xBF][1];
                        }
                    }
                }

                ++pbText;
                --len;
            }
            else
            {
                if (*pbText >= 'a' && *pbText <= 'z')
                {
                    *pbText = rkTextConvTable.acLower[*pbText - 'a'];
                }
                else if (*pbText >= 'A' && *pbText <= 'Z')
                {
                    *pbText = rkTextConvTable.acUpper[*pbText - 'A'];
                }
            }
        }
        else
        {
            if (*pbText & 0x80)
            {
                ++pbText;
                --len;
            }
        }
    }
}
si modifica in
void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct)
{
    szText;
}
Am testat, Dar tot nu merge...
of doamne.. mari helperi, din nou nici nu ați înțeles ce a vrut omul să spună! :((

Mergi în sursa game, deschide input_p2p.cpp și caută:

Cod: Selectaţi tot

if (!d->GetCharacter() || (d->GetCharacter()->GetGMLevel() == GM_PLAYER && d->GetEmpire() != m_bEmpire))
Înlocuiește cu:

Cod: Selectaţi tot

if (!d->GetCharacter())
THX :x :***
T/C Rezolvat
Avatar utilizator
LikePc
Nivel 10

Nivel 10
Mesaje: 2240
Membru din: 11 Aug 2015, 00:01
Server: M3
Regat: Chunjo
Aprecieri: 9  
Mulţumiri: 270  
 Contact:
Medalii

Subiect mutat in probleme rezolvate.
https:/horus-maps.com
Afișează semnătura
Închis
Răspunsuri
6
Vizualizări
323
Răspunsuri
2
Vizualizări
185
Răspunsuri
3
Vizualizări
171
Răspunsuri
4
Vizualizări
376

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 24 vizitatori