C++:
locale\locale\tr\map klasöründeki txt lerde format hatası yaparsanız debug modda client açılmıyor onun için düzeltme
#define WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX
void CPythonMiniMap::__LoadAtlasMarkInfo()
{
ClearAtlasMarkInfo();
ClearGuildArea();
CPythonBackground& rkBG=CPythonBackground::Instance();
if (!rkBG.IsMapOutdoor())
return;
CMapOutdoor& rkMap=rkBG.GetMapOutdoorRef();
char szAtlasMarkInfoFileName[64+1];
_snprintf(szAtlasMarkInfoFileName, sizeof(szAtlasMarkInfoFileName), "%s/map/%s_point.txt", LocaleService_GetLocalePath(), rkMap.GetName().c_str());
CTokenVectorMap stTokenVectorMap;
if (!LoadMultipleTextData(szAtlasMarkInfoFileName, stTokenVectorMap))
{
Tracef(" CPythonMiniMap::__LoadAtlasMarkInfo File Load %s ERROR\n", szAtlasMarkInfoFileName);
return;
}
const std::string strType[TYPE_COUNT] = { "OPC", "OPCPVP", "OPCPVPSELF", "NPC", "MONSTER", "WARP", "WAYPOINT" };
#ifdef WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX
DWORD dwSkippedLineCount = 0;
std::string strFirstSkippedLine;
#endif
for (DWORD i = 0; i < stTokenVectorMap.size(); ++i)
{
char szMarkInfoName[32+1];
_snprintf(szMarkInfoName, sizeof(szMarkInfoName), "%d", i);
if (stTokenVectorMap.end() == stTokenVectorMap.find(szMarkInfoName))
continue;
const CTokenVector & rVector = stTokenVectorMap[szMarkInfoName];
#ifdef WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX
BYTE byLineType = TYPE_COUNT;
if (rVector.size() >= 4)
{
for (int iType = 0; iType < TYPE_COUNT; ++iType)
{
if (0 == rVector[0].compare(strType[iType]))
byLineType = (BYTE)iType;
}
}
if (TYPE_COUNT == byLineType)
{
if (0 == dwSkippedLineCount++)
{
strFirstSkippedLine = szMarkInfoName;
for (DWORD j = 0; j < rVector.size(); ++j)
strFirstSkippedLine += " " + rVector[j];
}
continue;
}
#endif
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;
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;
}
}
#ifdef WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX
if (dwSkippedLineCount)
TraceError("CPythonMiniMap::__LoadAtlasMarkInfo %s: %u line(s) not in <num> <type> <x> <y> <name> format, skipped (first: %s)", szAtlasMarkInfoFileName, dwSkippedLineCount, strFirstSkippedLine.c_str());
#endif
}
En Çok Reaksiyon Alan Mesajlar
Emeğine sağlık, teşekkürler.
Paylaşım için teşekkürler.
Yeni başlayanlar için anlatım:
Locale_inc.h içine ekle:
UserInterface/PythonMiniMap.cpp dosyasında __LoadAtlasMarkInfo fonksiyonunun içinde arat:
Altına ekle:
Aynı fonksiyonda arat:
Altına ekle:
Aynı fonksiyonun sonunda arat:
Altına ekle:
Son eklenen kısım fonksiyonun kapanış parantezinden önce, for döngüsünün hemen altında olmalı. Sonra client'ı derleyin. Syserr'de bu satırı görürseniz yazan dosyayı açıp belirtilen satırdaki eksik değeri tamamlayın.
Naçizane tavsiyem bu tarz konuları eklerken kod bloğunu olduğu gibi değiştirmeyin arkadaşlar kendi yapmış olduğunuz düzenlemeleri kaybetmemek adına sadece düzenlemeyi eklemeniz kafidir.
Locale_inc.h içine ekle:
Kod:
#define WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX
UserInterface/PythonMiniMap.cpp dosyasında __LoadAtlasMarkInfo fonksiyonunun içinde arat:
Kod:
const std::string strType[TYPE_COUNT] = { "OPC", "OPCPVP", "OPCPVPSELF", "NPC", "MONSTER", "WARP", "WAYPOINT" };
Altına ekle:
Kod:
#ifdef WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX
DWORD dwSkippedLineCount = 0;
std::string strFirstSkippedLine;
#endif
Aynı fonksiyonda arat:
Kod:
const CTokenVector & rVector = stTokenVectorMap[szMarkInfoName];
Altına ekle:
Kod:
#ifdef WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX
BYTE byLineType = TYPE_COUNT;
if (rVector.size() >= 4)
{
for (int iType = 0; iType < TYPE_COUNT; ++iType)
{
if (0 == rVector[0].compare(strType[iType]))
byLineType = (BYTE)iType;
}
}
if (TYPE_COUNT == byLineType)
{
if (0 == dwSkippedLineCount++)
{
strFirstSkippedLine = szMarkInfoName;
for (DWORD j = 0; j < rVector.size(); ++j)
strFirstSkippedLine += " " + rVector[j];
}
continue;
}
#endif
Aynı fonksiyonun sonunda arat:
Kod:
case TYPE_WARP:
m_AtlasWarpInfoVector.push_back(aAtlasMarkInfo);
break;
}
}
Altına ekle:
Kod:
#ifdef WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX
if (dwSkippedLineCount)
TraceError("CPythonMiniMap::__LoadAtlasMarkInfo %s: %u line(s) not in <num> <type> <x> <y> <name> format, skipped (first: %s)", szAtlasMarkInfoFileName, dwSkippedLineCount, strFirstSkippedLine.c_str());
#endif
Son eklenen kısım fonksiyonun kapanış parantezinden önce, for döngüsünün hemen altında olmalı. Sonra client'ı derleyin. Syserr'de bu satırı görürseniz yazan dosyayı açıp belirtilen satırdaki eksik değeri tamamlayın.
Naçizane tavsiyem bu tarz konuları eklerken kod bloğunu olduğu gibi değiştirmeyin arkadaşlar kendi yapmış olduğunuz düzenlemeleri kaybetmemek adına sadece düzenlemeyi eklemeniz kafidir.
Son düzenleme:
Paylaşım için teşekkürler.C++:locale\locale\tr\map klasöründeki txt lerde format hatası yaparsanız debug modda client açılmıyor onun için düzeltme #define WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX void CPythonMiniMap::__LoadAtlasMarkInfo() { ClearAtlasMarkInfo(); ClearGuildArea(); CPythonBackground& rkBG=CPythonBackground::Instance(); if (!rkBG.IsMapOutdoor()) return; CMapOutdoor& rkMap=rkBG.GetMapOutdoorRef(); char szAtlasMarkInfoFileName[64+1]; _snprintf(szAtlasMarkInfoFileName, sizeof(szAtlasMarkInfoFileName), "%s/map/%s_point.txt", LocaleService_GetLocalePath(), rkMap.GetName().c_str()); CTokenVectorMap stTokenVectorMap; if (!LoadMultipleTextData(szAtlasMarkInfoFileName, stTokenVectorMap)) { Tracef(" CPythonMiniMap::__LoadAtlasMarkInfo File Load %s ERROR\n", szAtlasMarkInfoFileName); return; } const std::string strType[TYPE_COUNT] = { "OPC", "OPCPVP", "OPCPVPSELF", "NPC", "MONSTER", "WARP", "WAYPOINT" }; #ifdef WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX DWORD dwSkippedLineCount = 0; std::string strFirstSkippedLine; #endif for (DWORD i = 0; i < stTokenVectorMap.size(); ++i) { char szMarkInfoName[32+1]; _snprintf(szMarkInfoName, sizeof(szMarkInfoName), "%d", i); if (stTokenVectorMap.end() == stTokenVectorMap.find(szMarkInfoName)) continue; const CTokenVector & rVector = stTokenVectorMap[szMarkInfoName]; #ifdef WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX BYTE byLineType = TYPE_COUNT; if (rVector.size() >= 4) { for (int iType = 0; iType < TYPE_COUNT; ++iType) { if (0 == rVector[0].compare(strType[iType])) byLineType = (BYTE)iType; } } if (TYPE_COUNT == byLineType) { if (0 == dwSkippedLineCount++) { strFirstSkippedLine = szMarkInfoName; for (DWORD j = 0; j < rVector.size(); ++j) strFirstSkippedLine += " " + rVector[j]; } continue; } #endif 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; 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; } } #ifdef WJ_ENABLE_ATLAS_MARK_INFO_SHORT_LINE_FIX if (dwSkippedLineCount) TraceError("CPythonMiniMap::__LoadAtlasMarkInfo %s: %u line(s) not in <num> <type> <x> <y> <name> format, skipped (first: %s)", szAtlasMarkInfoFileName, dwSkippedLineCount, strFirstSkippedLine.c_str()); #endif }
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
- Cevaplar
- 5
- Görüntüleme
- 241
- 5.00 yıldız(lar) 1 Değerlendirme
- Cevaplar
- 3
- Görüntüleme
- 734
- Cevaplar
- 15
- Görüntüleme
- 947
- Cevaplar
- 9
- Görüntüleme
- 612