Gameforge Atlas Güncellemesi

MEKA

Discord: mekaprojects
Süper Moderatör
Grafiker
Geliştirici
Yardımsever Üye
Mesaj
2.852
Çözümler
297
Beğeni
2.134
Puan
1.850
Ticaret Puanı
2
webzen CPythonMiniMap :: __ LoadAtlasMarkInfo fonksiyonunu değiştirdi. HEADER_GC_WARP paketini kaldırdı official sunucılarda artık NPC konumlarını vs serverden değil clientten çekiyor.

Eskiden konum bilgisi bu şekilde gözükürdü:


Kod:
Genişlet Daralt Kopyala
#TokenIndex Türü PosX PosY ToolTipText
0 WARP 140900 13900 "ąÚ¶óÇö"

Yeni olan ise bu şekilde:

Kod:
Genişlet Daralt Kopyala
#TokenIndex PosX PosY NPCVnum
0 44100 3300 20081

Değiştirilmiş kod bloğu bu şekildedir.

C++:
Genişlet Daralt Kopyala
void CPythonMiniMap::__LoadAtlasMarkInfo()
{
    ClearAtlasMarkInfo();
    ClearGuildArea();

    CPythonBackground& rkBG=CPythonBackground::Instance();
    if (!rkBG.IsMapOutdoor())
        return;

    CMapOutdoor& rkMap=rkBG.GetMapOutdoorRef();

    // LOCALE
    char szAtlasMarkInfoFileName[64+1];
    _snprintf(szAtlasMarkInfoFileName, sizeof(szAtlasMarkInfoFileName), "%s/map/%s_point.txt", LocaleService_GetLocalePath(), rkMap.GetName().c_str());
    // END_OF_LOCALE

    CTokenVectorMap stTokenVectorMap;
    if (!LoadMultipleTextData(szAtlasMarkInfoFileName, stTokenVectorMap))
    {
        Tracef(" CPythonMiniMap::__LoadAtlasMarkInfo File Load %s ERROR\n", szAtlasMarkInfoFileName);
        return;
    }

#ifndef ENABLE_GF_ATLAS_MARK_INFO
    const std::string strType[TYPE_COUNT] = { "OPC", "OPCPVP", "OPCPVPSELF", "NPC", "MONSTER", "WARP", "WAYPOINT" };
#endif

    for (DWORD i = 0; i < stTokenVectorMap.size(); ++i)
    {
        char szMarkInfoName[32+1];
        _snprintf(szMarkInfoName, sizeof(szMarkInfoName), "%lu", i);

        if (stTokenVectorMap.end() == stTokenVectorMap.find(szMarkInfoName))
            continue;

        const CTokenVector & rVector = stTokenVectorMap[szMarkInfoName];

#ifdef ENABLE_GF_ATLAS_MARK_INFO
        const std::string& c_rstrPositionX = rVector[0].c_str();
        const std::string& c_rstrPositionY = rVector[1].c_str();
        const std::string& c_rstrVnum = rVector[2].c_str();
        const DWORD c_dwVnum = atoi(c_rstrVnum.c_str());

        const CPythonNonPlayer::TMobTable* c_pMobTable = CPythonNonPlayer::Instance().GetTable(c_dwVnum);
        if (c_pMobTable)
        {
            TAtlasMarkInfo aAtlasMarkInfo;
            aAtlasMarkInfo.m_fX = atof(c_rstrPositionX.c_str());
            aAtlasMarkInfo.m_fY = atof(c_rstrPositionY.c_str());
            aAtlasMarkInfo.m_strText = c_pMobTable->szLocaleName;
            if (c_pMobTable->bType == CActorInstance::TYPE_NPC)
                aAtlasMarkInfo.m_byType = TYPE_NPC;
            else if (c_pMobTable->bType == CActorInstance::TYPE_WARP)
            {
                aAtlasMarkInfo.m_byType = TYPE_WARP;
                int iPos = aAtlasMarkInfo.m_strText.find(" ");
                if (iPos >= 0)
                    aAtlasMarkInfo.m_strText[iPos] = 0;

            }
            else if (c_pMobTable->bType == CActorInstance::TYPE_STONE && c_dwVnum >= 20702 && c_dwVnum <= 20706)
                aAtlasMarkInfo.m_byType = TYPE_NPC;

            aAtlasMarkInfo.m_fScreenX = aAtlasMarkInfo.m_fX / m_fAtlasMaxX * m_fAtlasImageSizeX - (float)m_WhiteMark.GetWidth() / 2.0f;
            aAtlasMarkInfo.m_fScreenY = aAtlasMarkInfo.m_fY / m_fAtlasMaxY * m_fAtlasImageSizeY - (float)m_WhiteMark.GetHeight() / 2.0f;

            switch (aAtlasMarkInfo.m_byType)
            {
            case TYPE_NPC:
                m_AtlasNPCInfoVector.push_back(aAtlasMarkInfo);
                break;
            case TYPE_WARP:
                m_AtlasWarpInfoVector.push_back(aAtlasMarkInfo);
                break;
            }
        }
#else
        const std::string & c_rstrType = rVector[0].c_str();
        const std::string & c_rstrPositionX = rVector[1].c_str();
        const std::string & c_rstrPositionY = rVector[2].c_str();
        const std::string & c_rstrText = rVector[3].c_str();

        TAtlasMarkInfo aAtlasMarkInfo;
        //memset(&aAtlasMarkInfo, 0, sizeof(aAtlasMarkInfo));

        for ( int i = 0; i < TYPE_COUNT; ++i)
        {
            if (0 == c_rstrType.compare(strType[i]))
                aAtlasMarkInfo.m_byType = (BYTE)i;
        }
        aAtlasMarkInfo.m_fX = atof(c_rstrPositionX.c_str());
        aAtlasMarkInfo.m_fY = atof(c_rstrPositionY.c_str());
        aAtlasMarkInfo.m_strText = c_rstrText;

        aAtlasMarkInfo.m_fScreenX = aAtlasMarkInfo.m_fX / m_fAtlasMaxX * m_fAtlasImageSizeX - (float)m_WhiteMark.GetWidth() / 2.0f;
        aAtlasMarkInfo.m_fScreenY = aAtlasMarkInfo.m_fY / m_fAtlasMaxY * m_fAtlasImageSizeY - (float)m_WhiteMark.GetHeight() / 2.0f;

        switch(aAtlasMarkInfo.m_byType)
        {
            case TYPE_NPC:
                m_AtlasNPCInfoVector.push_back(aAtlasMarkInfo);
                break;
            case TYPE_WARP:
                m_AtlasWarpInfoVector.push_back(aAtlasMarkInfo);
                break;
        }
#endif
    }
}

Serverden paketi kaldırmayı unutmayın.Örnek localede konuya ekliyorum.


Alıntı Yapılan Kaynak:
Linkleri görebilmek için giriş yap veya kayıt ol.
 

Dosya Eklentileri

Geri
Üst