|
You last visited: Today at 20:29
Advertisement
[Question] Adding Map
Discussion on [Question] Adding Map within the Flyff Private Server forum part of the Flyff category.
12/18/2017, 15:15
|
#1
|
elite*gold: 0
Join Date: Jun 2008
Posts: 355
Received Thanks: 5
|
[Question] Adding Map
What could be the possible reason why I cant add a new map in my files? I mean
I added a new map detailed in
defineworld.h
Code:
#define WI_WORLD_SKANDIA 245
World.inc
Code:
WI_WORLD_SKANDIA "WdSkandia"
WI_WORLD_SKANDIA SetTitle
(
IDS_WORLD_INC_000003
);
World.txt.txt
Code:
IDS_WORLD_INC_000003 SAMPLE MAP
CoreServer.ini
And then after that, I will go and open the program and then the worldserver will automatically close with-out giving any error log.
My question is, What could be the possible reason why that problem happen?
Thank you
|
|
|
12/18/2017, 15:40
|
#2
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,740
Received Thanks: 1,670
|
Start your Worldserver in a debug session in Visual Studio and wait for an exception to occur - it should show the last lines executed/called.
|
|
|
12/18/2017, 19:10
|
#3
|
elite*gold: 0
Join Date: Jan 2008
Posts: 130
Received Thanks: 78
|
Make sure the map folder WdSkandia has no .res or w/e packed files in general will cause this sometimes.
|
|
|
12/19/2017, 01:07
|
#4
|
elite*gold: 0
Join Date: Jun 2008
Posts: 355
Received Thanks: 5
|
Quote:
Originally Posted by xTwiLightx
Start your Worldserver in a debug session in Visual Studio and wait for an exception to occur - it should show the last lines executed/called.
|
This is the result of my debug, in call stack
Code:
7. World.exe!CRespawnInfo::GenResPoint(CWorld * pWorld) Line 97 C++
7. World.exe!CWorld::ReadRespawn(CScript & s) Line 771 C++
7. World.exe!CWorld::LoadRegion() Line 808 C++
7. World.exe!CDPDatabaseClient::OnBaseGameSetting(CAr & ar, unsigned long __formal, unsigned long __formal) Line 1756 C++
7. World.exe!CDPDatabaseClient::UserMessageHandler(DPMSG_GENERIC * lpMsg, unsigned long dwMsgSize, unsigned long idFrom) Line 261 C++
7. World.exe!CDPMng::ReceiveMessage() Line 187 C++
7. World.exe!CRunObject::Run() Line 381 C++
> 7. World.exe!CRunObject::_Run(void * pParam) Line 305 C++
Error line in sequence
Code:
#ifdef __RES0807
#define MAX_FAIL_TO_RESPAWN 10000
BOOL CRespawnInfo::GenResPoint( CWorld* pWorld )
{
int nCheckAttr = HATTR_NOWALK;
[COLOR="Red"] if( m_dwType == OT_MOVER && prj.GetMoverProp( m_dwIndex )->dwFlying )[/COLOR]
nCheckAttr = HATTR_NOFLY;
D3DXVECTOR3 v;
int nSize = 0;
int nFail = 0;
while( 1 )
{
GetPos( v, FALSE );
int nAttr = pWorld->GetHeightAttribute( v.x, v.z );
if( nAttr == -1 || nAttr == HATTR_NOMOVE || nAttr == nCheckAttr )
{
if( ++nFail > MAX_FAIL_TO_RESPAWN )
return FALSE;
continue;
}
m_aResPoint[nSize].x = (LONG)( v.x );
m_aResPoint[nSize++].y = (LONG)( v.z );
if( nSize >= MAX_RESPOINT_PER_REGION )
break;
}
// TRACE( "nFail=%d\n", nFail );
return TRUE;
}
#endif // __RES0807
Code:
#ifdef __WORLDSERVER
#ifdef __RES0807
[COLOR="Red"] if( FALSE == ri.GenResPoint( this ) )[/COLOR]
{
char lpOutputString[256] = { 0,};
sprintf( lpOutputString, "type=%d, index=%d, left=%d, top=%d, right=%d, bottom=%d, num=%d",
ri.m_dwType, ri.m_dwIndex, ri.m_rect.left, ri.m_rect.top, ri.m_rect.right, ri.m_rect.bottom, ri.m_nMaxcb );
OutputDebugString( lpOutputString );
return FALSE;
}
#endif // __RES0807
m_respawner.Add( ri );
Code:
BOOL CWorld::LoadRegion()
{
#if defined( __WORLDSERVER ) || defined(__CLIENT)
CString strLandName = m_szFileName;
CString strLandTemp;
strLandName.Delete( strLandName.GetLength() - 4, 4 );
strLandTemp.Format( "%s%s.rgn", m_szFilePath, strLandName );
CScript s;
if( s.Load( strLandTemp, FALSE ) )
{
D3DXVECTOR3 vPos;
s.GetToken();
while( s.tok != FINISHED )
{
if( s.Token == _T( "region" ) || s.Token == _T( "region2" ) || s.Token == _T( "region3" ) )
{
ReadRegion( s );
}
else
if( s.Token == _T( "respawn" ) || s.Token == _T( "respawn2" ) || s.Token == _T( "respawn3" ) || s.Token == _T( "respawn4" ) || s.Token == _T( "respawn5" ) || s.Token == _T( "respawn6" ) || s.Token == _T( "respawn7" ))
{
[COLOR="red"] ReadRespawn( s );[/COLOR]
}
s.GetToken();
}
#ifdef __LAYER_1021
Expand();
#endif // __LAYER_1021
return TRUE;
}
#endif
return FALSE;
}
Code:
void CDPDatabaseClient::OnBaseGameSetting( CAr & ar, DPID, DPID )
{
#ifdef __S1108_BACK_END_SYSTEM
BOOL bBaseGameSetting = FALSE;
BOOL bFirst = FALSE;
ar >> bFirst;
ar >> bBaseGameSetting;
if( bBaseGameSetting )
{
ar >> prj.m_fMonsterExpRate >> prj.m_fGoldDropRate >> prj.m_fItemDropRate >> prj.m_fMonsterHitRate;
ar >> prj.m_fShopCost >> prj.m_fMonsterRebirthRate >> prj.m_fMonsterHitpointRate >> prj.m_fMonsterAggressiveRate >> prj.m_fMonsterRespawnRate;
}
g_UserMng.AddGameRate( prj.m_fMonsterExpRate, GAME_RATE_MONSTEREXP );
g_UserMng.AddGameRate( prj.m_fGoldDropRate, GAME_RATE_GOLDDROP );
g_UserMng.AddGameRate( prj.m_fItemDropRate, GAME_RATE_ITEMDROP );
g_UserMng.AddGameRate( prj.m_fMonsterHitRate, GAME_RATE_MONSTERHIT );
g_UserMng.AddGameRate( prj.m_fShopCost, GAME_RATE_SHOPCOST );
g_UserMng.AddGameRate( prj.m_fMonsterRebirthRate, GAME_RATE_REBIRTH );
g_UserMng.AddGameRate( prj.m_fMonsterHitpointRate, GAME_RATE_HITPOINT );
g_UserMng.AddGameRate( prj.m_fMonsterAggressiveRate, GAME_RATE_AGGRESSIVE );
g_UserMng.AddGameRate( prj.m_fMonsterRespawnRate, GAME_RATE_RESPAWN );
if( bFirst )
{
CWorld* pWorld;
pWorld = g_WorldMng.GetFirstActive();
while( pWorld )
{
pWorld->LoadRegion();
#ifdef __EVENT_0117
#ifdef __LAYER_1021
CRespawner* pRespawner = pWorld->m_respawner.Proto();
#else // __LAYER_1021
CRespawner* pRespawner = &pWorld->m_respawner;
#endif // __LAYER_1021
[COLOR="red"] for( int i = 0; i < (int)( pRespawner->m_vRespawnInfo[RESPAWNTYPE_REGION].size() ); ++i )[/COLOR]
{
CRespawnInfo* pRespawnInfo = &( pRespawner->m_vRespawnInfo[RESPAWNTYPE_REGION][i] );
if( pRespawnInfo->m_dwType == OT_MOVER ) // ¸ó½ºÅÍ ¸®½ºÆù
{
MoverProp* pMoverProp = prj.GetMoverProp( pRespawnInfo->m_dwIndex );
#if __VER >= 10 // __LEGEND // 10Â÷ Àü½Â½Ã½ºÅÛ Neuz, World, Trans
#if __VER >= 15 // __HERO129_VER15 // 15Â÷ È÷¾î·Î ·¹º§È®Àå
if( pMoverProp && pMoverProp->dwFlying == 0 && pMoverProp->dwLevel > 0 && pMoverProp->dwLevel <= MAX_MONSTER_LEVEL )
#else // 15Â÷ È÷¾î·Î ·¹º§È®Àå
if( pMoverProp && pMoverProp->dwFlying == 0 && pMoverProp->dwLevel > 0 && pMoverProp->dwLevel <= MAX_LEGEND_LEVEL )
#endif // 15Â÷ È÷¾î·Î ·¹º§È®Àå
#else //__LEGEND // 10Â÷ Àü½Â½Ã½ºÅÛ Neuz, World, Trans
if( pMoverProp && pMoverProp->dwFlying == 0 && pMoverProp->dwLevel > 0 && pMoverProp->dwLevel <= MAX_GENERAL_LEVEL )
#endif //__LEGEND // 10Â÷ Àü½Â½Ã½ºÅÛ Neuz, World, Trans
{
#ifdef _DEBUG
TRACE( "%d, (%d, %d, %d, %d)\n", pRespawnInfo->m_dwIndex, pRespawnInfo->m_rect.left, pRespawnInfo->m_rect.top, pRespawnInfo->m_rect.right, pRespawnInfo->m_rect.bottom );
#endif // _DEBUG
CEventGeneric::GetInstance()->AddRegionGeneric( pMoverProp->dwLevel, pWorld->GetID(), pRespawnInfo );
#ifdef __EVENTLUA_SPAWN
if( pWorld->GetID() == WI_WORLD_MADRIGAL ) // ÇöÀç±îÁö´Â ¸¶µå¸®°¥ ´ë·ú¿¡¸¸ ÃâÇöÇÑ´Ù.
prj.m_EventLua.SetAddSpawnRegion( pWorld->GetID(), pRespawnInfo->m_rect );
#endif // __EVENTLUA_SPAWN
} // if
} // if
} // for
#endif // __EVENT_0117
pWorld = pWorld->nextptr;
} // while
#ifdef __EVENT_0117
CEventGeneric::GetInstance()->SortRegionGeneric();
#endif // __EVENT_0117
} // if
#endif // __S1108_BACK_END_SYSTEM
}
Code:
void CDPDatabaseClient::UserMessageHandler( LPDPMSG_GENERIC lpMsg, DWORD dwMsgSize, DPID idFrom )
{
CAr ar( (LPBYTE)lpMsg + sizeof(DPID) + sizeof(DPID), dwMsgSize - ( sizeof(DPID) + sizeof(DPID) ) );
GETTYPE( ar );
static map<DWORD, CString> mapstrProfile;
map<DWORD, CString>::iterator it = mapstrProfile.find( dw );
if( it == mapstrProfile.end() )
{
CString strTemp;
strTemp.Format("CDPDatabaseClient::UserMessageHandler(0x%08x)", dw );
it = mapstrProfile.insert( make_pair( dw, strTemp ) ).first;
}
_PROFILE( it->second );
void ( theClass::*pfn )( theParameters ) = GetHandler( dw );
if( pfn )
( this->*( pfn ) )( ar, *(UNALIGNED LPDPID)lpMsg, *(UNALIGNED LPDPID)( (LPBYTE)lpMsg + sizeof(DPID) ) );
[COLOR="red"] else [/COLOR]
Error( "Handler not found(%08x)\n",dw );
}
Code:
#ifdef __CRC
uDataSize = *(UNALIGNED LPDWORD)( ptr + m_pDPSock->m_dwDataSizeOffset );
if( pBuffer->dpid ==DPID_SYSMSG )
SysMessageHandler( (LPDPMSG_GENERIC)&ptr[m_pDPSock->m_dwReadHeaderSize], uDataSize, pBuffer->dpid );
else
UserMessageHandler( (LPDPMSG_GENERIC)&ptr[m_pDPSock->m_dwReadHeaderSize], uDataSize, pBuffer->dpid );
ptr += m_pDPSock->m_dwReadHeaderSize + uDataSize;
#else // __CRC
uDataSize = pBuffer->GetPacketSize( ptr );
if( pBuffer->dpid == DPID_SYSMSG )
SysMessageHandler( (LPDPMSG_GENERIC)( ptr + pBuffer->GetHeaderLength() ), uDataSize, pBuffer->dpid );
else
UserMessageHandler( (LPDPMSG_GENERIC)( ptr + pBuffer->GetHeaderLength() ), uDataSize, pBuffer->dpid );
[COLOR="red"] ptr += ( uDataSize + pBuffer->GetHeaderLength() );[/COLOR]
#endif
Code:
PROFILE_RUN( r3 );
if( timeoutReadTrans.TimeoutReset( g_tmCurrent ) )
{
_PROFILE( "g_dpDBClient.ReceiveMessage()" );
[COLOR="red"] g_dpDBClient.ReceiveMessage();[/COLOR]
}
Code:
u_int CRunObject::_Run( LPVOID pParam )
{
CRunObject* pRunObject = (CRunObject*)pParam;
pRunObject->Run();
[COLOR="red"] return 0;[/COLOR]
}
Quote:
Originally Posted by Sammyz
Make sure the map folder WdSkandia has no .res or w/e packed files in general will cause this sometimes.
|
Yes I'am sure that there's no encrypted files inside the World folder I also make sure that I got the same World folder and the name in the World.inc
WI_INSTANCE_DUCASTULA " DuSample"
|
|
|
12/19/2017, 02:02
|
#5
|
elite*gold: 0
Join Date: Jan 2008
Posts: 130
Received Thanks: 78
|
Use a clean .rgn file, empty it out.
|
|
|
Similar Threads
|
Adding NPC's and Adding Items in Shopping Mall
03/19/2015 - CO2 Private Server - 21 Replies
Hello there,
I have an 5518 source; Albetros Source.
Now I have a few questions about it.
1. How do you add new NPC's and where can I find them in the Source?
2. How to add items in the Shopping Mall. I tried a few things but that didn't helped me alot.
3. How to set game char to GM. I tried to give it 5 but that didn't helped either. I looked in the Commands file and that was 5. But it didn't helped.
Thanks...
|
Metin2 Servere map ekleme ? Adding a new map ?
08/31/2014 - Metin2 - 2 Replies
Arkadaşlar ben Türküm bizim forumlarda hiç bir bilgi yok .
Serverime yeni map eklemek istiyorum nasıl eklerim bilgi ?
Adding a new map ?
|
All times are GMT +2. The time now is 20:29.
|
|