Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Moving Tantra Online to Unity Engine

Joined
Oct 23, 2012
Messages
39
Reaction score
1
mm yes u can start with the leaked source code.
this function the zoneserver read MapData.tcm u can port to c#
int BASE_InitializeAttribute(E_COUNTRY_ID contry) // reading g_pAttribute
{
#ifdef __ZONE_SERVER__
g_kInfluenceMap.Init();

FILE* fp = NULL;

if (fp == NULL)
{
::fopen_s(&fp, "MapData.tcm", "rb");
if (fp == NULL)
{
MessageBox(NULL, "can't file MapData.tcm file", "error", MB_OK | MB_SYSTEMMODAL);
return FALSE;
}

//
MAP_FILE_HEADER header;

fread(&header, sizeof(header), 1, fp);

CELL_STATUS status[10];
CELL_INFO info;

for (DWORD dwIndex = 0; dwIndex < header.dwFloorCountTotal; dwIndex++)
{
fread(&info, sizeof(CELL_INFO), 1, fp);
fread(status, sizeof(CELL_STATUS), info.byCount, fp);

//fors_debug ²âÊÔ¿Í»§¶ËµØͼÓ÷þÎñ¶Ë
g_krgCell[info.wZ][info.wX].usHeight = status[0].wHeight;

g_krgCell[info.wZ][info.wX].usProperty = status[0].wState;
//fors_debug ²âÊÔ¿Í»§¶ËµØͼÓ÷þÎñ¶Ë
g_krgCell[info.wZ][info.wX].usEvent = (short)status[0].dwEvent;

if (0 < g_krgCell[info.wZ][info.wX].usEvent && eEvent_MaxCount > g_krgCell[info.wZ][info.wX].usEvent)
g_krgCell[info.wZ][info.wX].usProperty = (g_krgCell[info.wZ][info.wX].usProperty | eTNCell_HaveEvent);
}

return TRUE;

}
else
{
fread(g_krgCell, sizeof(g_krgCell), 1, fp);
}

for (int y = 0; y < MAX_GRIDY; ++y)
for (int x = 0; x < MAX_GRIDX; ++x)
{ //fors_debug µØͼ too

if (eTNCell_SafetyZone & g_krgCell[y][x].usProperty)
g_kInfluenceMap.PropagteInfl(x, y, TNInfluenceMap::eInfl_SaftyZone);

else if (eTNCell_Blocked & g_krgCell[y][x].usProperty)
g_kInfluenceMap.PropagteInfl(x, y, TNInfluenceMap::eInfl_Forbidden, 0);
}

::fclose(fp);
#endif //__ZONE_SERVER__
return TRUE;
}
 
Back
Top