InstanceDungeon

03/14/2019 15:54 babyminion#1
can anyone help please?

Code:
		if( pWorld->m_linkMap.GetLinkMap( static_cast<int>( dwDungeonId ) ) )
		{
			SetLeaveMarkingPos( pUser, dwWorldId, vPos );
			int nRandx = xRandom(4) - 2;
			int nRandz = xRandom(4) - 2;
			vPos += D3DXVECTOR3( (float)( nRandx ), (float)( 0 ), (float)( nRandz ) );
			pUser->REPLACE( g_uIdofMulti, dwWorldId, vPos, REPLACE_NORMAL, static_cast<int>( dwDungeonId ) );
			IncreasePlayerCount( static_cast<DWORD>( pUser->m_idparty ), dwWorldId );
			if( !pCT_Info || pCT_Info->dwDungeonId != dwDungeonId )	// 090813 ´øÀüÀÌ À¯ÁöµÇ°í ÀÖ´Â »óÅ¿¡¼*ÀÇ ÀçÀÔÀåÀº setÇÏÁö ¾ÊÀ½ 
#ifdef [B]__VIP[/B]
				CInstanceDungeonHelper::GetInstance()->SendInstanceDungeonSetCoolTimeInfo( g_uKey, GetType(), pUser->m_idPlayer, COOLTIME_INFO( dwWorldId, dwDungeonId, ( GetCoolTime( dwWorldId, pUser) + GetTickCount() ) ) );

#else
				CInstanceDungeonHelper::GetInstance()->SendInstanceDungeonSetCoolTimeInfo( g_uKey, GetType(), pUser->m_idPlayer, COOLTIME_INFO( dwWorldId, dwDungeonId, ( GetCoolTime( dwWorldId) + GetTickCount() ) ) );
#endif
			return TRUE;
		}
		else
			return FALSE;
	}
	else	// ÇØ´ç ´øÀüÀÌ Á¸ÀçÇÏÁö ¾ÊÀ¸¸é CoreServer·Î »ý¼º ÇÒ °ÍÀ» ¿äû ÇÑ´Ù.
	{
		if( CInstanceDungeonHelper::GetInstance()->m_nIDLayerNum < m_nMaxInstanceDungeon )
			CInstanceDungeonHelper::GetInstance()->SendInstanceDungeonCreate( GetType(), dwDungeonId, ID_INFO( dwWorldId, g_uKey ) );
		else
		{
			pUser->AddDefinedText( TID_GAME_INSTANCE_MAX );
			return FALSE;
		}
	}
	
	return TRUE;
}
Error:
Code:
C:\Flyff\Source\Program\_Common\InstanceDungeonBase.cpp(697): error C2660: 'CInstanceDungeonBase::GetCoolTime' : function does not take 2 arguments
03/14/2019 16:24 マリブ#2
Quote:
Originally Posted by babyminion View Post
can anyone help please?

Code:
		if( pWorld->m_linkMap.GetLinkMap( static_cast<int>( dwDungeonId ) ) )
		{
			SetLeaveMarkingPos( pUser, dwWorldId, vPos );
			int nRandx = xRandom(4) - 2;
			int nRandz = xRandom(4) - 2;
			vPos += D3DXVECTOR3( (float)( nRandx ), (float)( 0 ), (float)( nRandz ) );
			pUser->REPLACE( g_uIdofMulti, dwWorldId, vPos, REPLACE_NORMAL, static_cast<int>( dwDungeonId ) );
			IncreasePlayerCount( static_cast<DWORD>( pUser->m_idparty ), dwWorldId );
			if( !pCT_Info || pCT_Info->dwDungeonId != dwDungeonId )	// 090813 ´øÀüÀÌ À¯ÁöµÇ°í ÀÖ´Â »óÅ¿¡¼*ÀÇ ÀçÀÔÀåÀº setÇÏÁö ¾ÊÀ½ 
#ifdef [B]__VIP[/B]
				CInstanceDungeonHelper::GetInstance()->SendInstanceDungeonSetCoolTimeInfo( g_uKey, GetType(), pUser->m_idPlayer, COOLTIME_INFO( dwWorldId, dwDungeonId, ( GetCoolTime( dwWorldId, pUser) + GetTickCount() ) ) );

#else
				CInstanceDungeonHelper::GetInstance()->SendInstanceDungeonSetCoolTimeInfo( g_uKey, GetType(), pUser->m_idPlayer, COOLTIME_INFO( dwWorldId, dwDungeonId, ( GetCoolTime( dwWorldId) + GetTickCount() ) ) );
#endif
			return TRUE;
		}
		else
			return FALSE;
	}
	else	// ÇØ´ç ´øÀüÀÌ Á¸ÀçÇÏÁö ¾ÊÀ¸¸é CoreServer·Î »ý¼º ÇÒ °ÍÀ» ¿äû ÇÑ´Ù.
	{
		if( CInstanceDungeonHelper::GetInstance()->m_nIDLayerNum < m_nMaxInstanceDungeon )
			CInstanceDungeonHelper::GetInstance()->SendInstanceDungeonCreate( GetType(), dwDungeonId, ID_INFO( dwWorldId, g_uKey ) );
		else
		{
			pUser->AddDefinedText( TID_GAME_INSTANCE_MAX );
			return FALSE;
		}
	}
	
	return TRUE;
}
Error:
Code:
C:\Flyff\Source\Program\_Common\InstanceDungeonBase.cpp(697): error C2660: 'CInstanceDungeonBase::GetCoolTime' : function does not take 2 arguments
GetCoolTime' : function does not take 2 arguments
03/14/2019 16:47 Lindanus#3
show/check the InstanceDungeonBase.lua
03/14/2019 17:20 babyminion#4
InstanceDungeonBase.lua
Quote:
Originally Posted by Lindanus View Post
show/check the InstanceDungeonBase.lua
Code:
nMaxInstanceDungeon = 40

tDungeon = {}
--------------------------------------------------------------------
-- ½Ã°£ ¼³Á¤ °ü·Ã ÇÔ¼ö ---------------------------------------------
--------------------------------------------------------------------
function SEC( a ) return a * 1000 end
function MIN( a ) return SEC( a ) * 60 end


function AddDungeon( strWorldId )
	local nIndex = table.getn( tDungeon ) + 1
	
	tDungeon[nIndex] = {}
	tDungeon[nIndex].strWorldId = strWorldId
	tDungeon[nIndex].dwClass = 65535
	tDungeon[nIndex].nMinLevel = 1
	tDungeon[nIndex].nMaxLevel = 120
	tDungeon[nIndex].dwCoolTime = MIN( 30 )
	tDungeon[nIndex].tMonster = {}
	tDungeon[nIndex].tTeleport = {}
end


CLASS_NORMAL	= 1
CLASS_MASTER	= 2
CLASS_HERO	= 4
CLASS_LEGEND_HERO = 8

function SetClass( ... )
	local nIndex = table.getn( tDungeon )
	local dwClass = 0
	if( arg.n > 0 ) then
		for indx = 1, arg.n do
			dwClass = dwClass + arg[indx]
		end
	end
	tDungeon[nIndex].dwClass = dwClass
end


function SetLevel( nMinLevel, nMaxLevel )
	local nIndex = table.getn( tDungeon )
	tDungeon[nIndex].nMinLevel = nMinLevel
	tDungeon[nIndex].nMaxLevel = nMaxLevel
end


function SetCoolTime( dwCoolTime )
	local nIndex = table.getn( tDungeon )
	tDungeon[nIndex].dwCoolTime = dwCoolTime
end


ID_NORMAL	= 0
ID_MIDBOSS 	= 1
ID_BOSS		= 2
function SetMonster( nType, strMonsterId, bRed, x, y, z )
	local nPDIndex = table.getn( tDungeon )
	local nMTIndex = table.getn( tDungeon[nPDIndex].tMonster ) + 1
		
	tDungeon[nPDIndex].tMonster[nMTIndex] = {}
	tDungeon[nPDIndex].tMonster[nMTIndex].nType = nType
	tDungeon[nPDIndex].tMonster[nMTIndex].strMonsterId = strMonsterId
	tDungeon[nPDIndex].tMonster[nMTIndex].bRed = bRed
	tDungeon[nPDIndex].tMonster[nMTIndex].x = x
	tDungeon[nPDIndex].tMonster[nMTIndex].y = y
	tDungeon[nPDIndex].tMonster[nMTIndex].z = z
end


function SetTeleportPos( nType, x, y, z )
	local nPDIndex = table.getn( tDungeon )
	local nTPIndex = table.getn( tDungeon[nPDIndex].tTeleport ) + 1
		
	tDungeon[nPDIndex].tTeleport[nTPIndex] = {}
	tDungeon[nPDIndex].tTeleport[nTPIndex].nType = nType
	tDungeon[nPDIndex].tTeleport[nTPIndex].x = x
	tDungeon[nPDIndex].tTeleport[nTPIndex].y = y
	tDungeon[nPDIndex].tTeleport[nTPIndex].z = z
end
03/14/2019 20:06 - DK#5
Quote:
Originally Posted by babyminion View Post
can anyone help please?

Code:
		if( pWorld->m_linkMap.GetLinkMap( static_cast<int>( dwDungeonId ) ) )
		{
			SetLeaveMarkingPos( pUser, dwWorldId, vPos );
			int nRandx = xRandom(4) - 2;
			int nRandz = xRandom(4) - 2;
			vPos += D3DXVECTOR3( (float)( nRandx ), (float)( 0 ), (float)( nRandz ) );
			pUser->REPLACE( g_uIdofMulti, dwWorldId, vPos, REPLACE_NORMAL, static_cast<int>( dwDungeonId ) );
			IncreasePlayerCount( static_cast<DWORD>( pUser->m_idparty ), dwWorldId );
			if( !pCT_Info || pCT_Info->dwDungeonId != dwDungeonId )	// 090813 ´øÀüÀÌ À¯ÁöµÇ°í ÀÖ´Â »óÅ¿¡¼*ÀÇ ÀçÀÔÀåÀº setÇÏÁö ¾ÊÀ½ 
#ifdef [B]__VIP[/B]
				CInstanceDungeonHelper::GetInstance()->SendInstanceDungeonSetCoolTimeInfo( g_uKey, GetType(), pUser->m_idPlayer, COOLTIME_INFO( dwWorldId, dwDungeonId, ( GetCoolTime( dwWorldId, pUser) + GetTickCount() ) ) );

#else
				CInstanceDungeonHelper::GetInstance()->SendInstanceDungeonSetCoolTimeInfo( g_uKey, GetType(), pUser->m_idPlayer, COOLTIME_INFO( dwWorldId, dwDungeonId, ( GetCoolTime( dwWorldId) + GetTickCount() ) ) );
#endif
			return TRUE;
		}
		else
			return FALSE;
	}
	else	// ÇØ´ç ´øÀüÀÌ Á¸ÀçÇÏÁö ¾ÊÀ¸¸é CoreServer·Î »ý¼º ÇÒ °ÍÀ» ¿äû ÇÑ´Ù.
	{
		if( CInstanceDungeonHelper::GetInstance()->m_nIDLayerNum < m_nMaxInstanceDungeon )
			CInstanceDungeonHelper::GetInstance()->SendInstanceDungeonCreate( GetType(), dwDungeonId, ID_INFO( dwWorldId, g_uKey ) );
		else
		{
			pUser->AddDefinedText( TID_GAME_INSTANCE_MAX );
			return FALSE;
		}
	}
	
	return TRUE;
}
Error:
Code:
C:\Flyff\Source\Program\_Common\InstanceDungeonBase.cpp(697): error C2660: 'CInstanceDungeonBase::GetCoolTime' : function does not take 2 arguments
function does not take 2 arguments

Check ur define of GetCoolTime