Colosseum Problem

Results 1 to 7 of 7
  1. #1
    Proficient Member Frostivus is offline
    MemberRank
    Dec 2015 Join Date
    169Posts

    Colosseum Problem

    Why is it everytime I go in the Colosseum when i go to the middle there is a glitch of a building ? blocking the mobs ? can someone help me please


  2. #2
    Proficient Member Frostivus is offline
    MemberRank
    Dec 2015 Join Date
    169Posts

    Re: Colosseum Problem

    Please help

  3. #3
    Proficient Member n0tso1ee7 is offline
    MemberRank
    Nov 2015 Join Date
    180Posts

    Re: Colosseum Problem

    I took a look for myself and I seen what you are talking about, if you read what I posted before I looked ignore it, I can only assume at some point they re-worked the o3d files,
    I used different Obj_Colosseum_*****_**.o3d files. I made a small folder of the ones I used and it worked fine after in beast.

    I smashed the o3d files into a folder for you if you like, simply copy and paste the files into both
    model folders in your resource and client
    https://drive.google.com/file/d/0B0B...ew?usp=sharing
    If you wanna rip your own from another client you might have feel free to do so.
    Last edited by n0tso1ee7; 20-07-16 at 10:49 PM.

  4. #4
    Enthusiast Ketchup is offline
    MemberRank
    Jan 2009 Join Date
    25Posts

    Re: Colosseum Problem

    Your using the non-update colosseum location from the old beta.

    Use this Colosseum.cpp instead.
    Code:
    #include "stdafx.h"
    #include "Colosseum.h"
    
    
    #ifdef __COLOSSEUM
    
    
    #include "defineText.h"
    #include "User.h"
    #include "worldmng.h"
    
    
    extern CWorldMng	g_WorldMng;
    extern CUserMng		g_UserMng;
    extern	CPartyMng	g_PartyMng;
    
    
    
    
    CColosseumMng::CColosseumMng()
    {
    }
    
    
    CColosseumMng::~CColosseumMng()
    {
    }
    
    
    CColosseumMng* CColosseumMng::GetInstance( void )
    {
    	static CColosseumMng sColosseum;
    	return &sColosseum;
    }
    
    
    BOOL CColosseumMng::CreateNewMatch( CUser* pUser, BYTE byDifficult, BYTE byMenu )
    {
    		CParty* pParty = g_PartyMng.GetParty( pUser->GetPartyId() );
    		if( pParty && IsValidObj( pUser ) )
    		{
    			if( GetMatchByParty( pParty ) != 0 ) return FALSE;
    			if( !pUser->GetGuild() && byMenu == 2 ) return FALSE;
    			if( byDifficult != 1 && byDifficult != 2 ) byDifficult = 1;
    			if( byMenu != 1 && byMenu != 2 ) byMenu = 1;
    			if( byDifficult == 1 && pUser->m_nLevel > 90 ) return FALSE;
    
    
    			CColosseumMatch* pMatch = new CColosseumMatch;
    			pMatch->m_uPartyID = pParty->m_uPartyId;
    			pMatch->m_byDifficult = byDifficult;
    			pMatch->m_byMenu = byMenu;
    			if( byMenu == 2 )
    				pMatch->m_uGuildID = pUser->m_idGuild;
    
    
    			if( byMenu == 1 )
    				pMatch->m_byBossStage = (BYTE)xRandom( 1, (BYTE)byMaxLowStage );
    			else
    				pMatch->m_byBossStage = (BYTE)xRandom( 1, (BYTE)byMaxHardStage );
    
    
    			pMatch->CreateRoomLayer();
    
    
    			for( int i = 1; i < pParty->m_nSizeofMember; i++ )
    			{
    				CUser* pPartyUser = g_UserMng.GetUserByPlayerID( pParty->m_aMember[i].m_uPlayerId );
    				if( pPartyUser )
    					if( pMatch->m_byMenu == 2 )
    					{
    						if( pPartyUser->m_idGuild == pMatch->m_uGuildID )
    							pPartyUser->SendColosseumEnter();
    					}
    					else
    						pPartyUser->SendColosseumEnter();
    			}
    
    
    			m_mapMatch.insert( make_pair( pParty->m_uPartyId, pMatch ));
    			return TRUE;
    		}
    		return FALSE;
    }
    
    
    BOOL CColosseumMng::LoadScript()
    {
    	if( m_Lua.RunScript( "Colosseum.lua" ) != 0 )
    	{
    		Error( "[CRITICAL] Colosseum.lua is missing." );
    		exit(0);
    	}
    
    
    	nStartWaitTime = static_cast<int>( m_Lua.GetGlobalNumber( "StartWaitTime" ) );
    	nWaitAfterStage = static_cast<int>( m_Lua.GetGlobalNumber( "WaitAfterStage" ) );
    	byMaxLowStage	=	static_cast<BYTE>( m_Lua.GetGlobalNumber( "LowStages" ) );
    	byMaxHardStage	=	static_cast<BYTE>( m_Lua.GetGlobalNumber( "HardStages" ) );
    
    
    	m_Lua.GetGloabal( "tMonster" );
    	m_Lua.PushNil();
    
    
    	while( m_Lua.TableLoop( -2 ) )
    	{
    		__COLOSSEUM_MONSTER srMonster;
    		srMonster.dwId = static_cast<int>( CScript::GetDefineNum( m_Lua.GetFieldToString( -1, "strMonsterId" ) ) );
    		srMonster.nTime = static_cast<int>( m_Lua.GetFieldToNumber( -1, "nTime" ) );
    		srMonster.nStage = static_cast<int>( m_Lua.GetFieldToNumber( -1, "nStage" ) );
    		srMonster.nDifficult = static_cast<int>( m_Lua.GetFieldToNumber(-1, "nType" ) );
    		m_vecMonster.push_back( srMonster );
    		m_Lua.Pop(1);
    	}
    
    
    	m_Lua.Pop(0);
    
    
    
    
    	return TRUE;
    }
    
    
    void CColosseumMng::DestroyMatch( u_long m_uPartyID )
    {
    	COLOSSEUMMATCH::iterator it=m_mapMatch.find( m_uPartyID );
    	if( it == m_mapMatch.end() )
    		return;
    		
    	safe_delete ( it->second );
    	m_mapMatch.erase( it );
    }
    
    
    void CColosseumMng::Process()
    {
    	for( COLOSSEUMMATCH::iterator it = m_mapMatch.begin(); it != m_mapMatch.end(); it++ )
    	{
    		u_long idParty = it->first;
    		CColosseumMatch* pMatch = it->second;
    
    
    		if( !pMatch ) return;
    
    
    		CMover* pMover = prj.GetMover(pMatch->m_nMoverID);
    		if( pMover )
    		{
    			if( pMatch->m_nNextStage < (int)g_tmCurrent )
    				pMatch->EndMatch( FALSE );
    		}
    		else
    		{
    			if( pMatch->m_nNextStage < (int)g_tmCurrent )
    			{
    				if( pMatch->m_nStage == 0 )
    				{
    					for( string::size_type i = 0; i < pMatch->m_vecPlayerID.size(); i++ )
    					{
    						CUser* pUser = pMatch->GetUser( pMatch->m_vecPlayerID.at(i) );
    						if( IsValidObj( pUser ) && pMatch->m_bWaitTime )
    							pUser->SendColosseumStart(0);
    					}
    				}
    				if( pMatch->m_nStage >= byMaxLowStage )
    					pMatch->EndMatch( TRUE );
    				else
    				{
    					pMatch->m_bWaitTime = FALSE;
    					pMatch->m_nStage++;
    					pMatch->CreateMover();
    				}
    			}
    		}
    	}
    }
    
    
    CColosseumMatch* CColosseumMng::GetMatchByParty( CParty* pParty)
    {
    	for( COLOSSEUMMATCH::iterator it = m_mapMatch.begin(); it != m_mapMatch.end(); it++ )
    		if( pParty->m_uPartyId == it->first )
    			return it->second;
    
    
    	return NULL;
    }
    
    
    CColosseumMatch* CColosseumMng::GetMatchByMoverID( DWORD dwMoverID )
    {
    	for( COLOSSEUMMATCH::iterator it = m_mapMatch.begin(); it != m_mapMatch.end(); it++ )
    	{
    		CColosseumMatch* cMatch = it->second;
    		if( cMatch->m_nMoverID == dwMoverID )
    			return cMatch;
    	}
    
    
    	return NULL;
    }
    
    
    CColosseumMatch::CColosseumMatch()
    {
    	m_bWaitTime		= TRUE;
    	m_nMoverID		= NULL;
    	m_nStartTime	= g_tmCurrent;
    	m_nStage		= 0;
    	m_nNextStage	= (int)g_tmCurrent + CColosseumMng::GetInstance()->nStartWaitTime;
    }
    
    
    CColosseumMatch::~CColosseumMatch()
    {
    	CWorld* pWorld = g_WorldMng.GetWorld( WI_WORLD_COLOSSEUM );
    	if( pWorld && pWorld->m_linkMap.GetLinkMap( static_cast<int>( m_uPartyID ) ) )
    		pWorld->Invalidate( m_uPartyID );
    }
    
    
    void CColosseumMatch::Process()
    {
    
    
    }
    
    
    void CColosseumMatch::CreateMover()
    {
    		int nMoverID = 0;
    
    
    		vector<__COLOSSEUM_MONSTER>	m_vecMobInfo = CColosseumMng::GetInstance()->m_vecMonster;
    		for( string::size_type i = 0; i < m_vecMobInfo.size(); i++ )
    		{
    			if( m_nStage == m_byBossStage && m_vecMobInfo.at(i).nDifficult == m_byDifficult )
    			{
    				nMoverID = m_vecMobInfo.at(i).dwId;
    				m_nNextStage = g_tmCurrent + m_vecMobInfo.at(i).nTime;
    			}
    			else
    				if( m_vecMobInfo.at(i).nDifficult == m_byDifficult && m_vecMobInfo.at(i).nStage == m_nStage )
    				{
    					nMoverID = m_vecMobInfo.at(i).dwId;
    					m_nNextStage = g_tmCurrent + m_vecMobInfo.at(i).nTime;
    				}
    		}
    
    
    		MoverProp* pMoverProp = prj.GetMoverPropEx( nMoverID );
    		CWorld* pWorld = g_WorldMng.GetWorld( WI_WORLD_COLOSSEUM );
    		if( pWorld && pMoverProp && pMoverProp->dwID != 0 )
    		{
    					D3DXVECTOR3 vPos( 1296.0F, 100.0F, 1228.0F );
    					CObj* pObj	= CreateObj( D3DDEVICE, OT_MOVER, pMoverProp->dwID );
    					pObj->SetPos( vPos );
    					pObj->InitMotion( MTI_STAND );
    					pObj->UpdateLocalMatrix();
    					((CMover*)pObj)->m_bActiveAttack = TRUE;
    					((CMover*)pObj)->AddItToGlobalId();
    					pWorld->ADDOBJ( pObj, FALSE, m_uPartyID );
    
    
    			m_nMoverID = ((CMover*)pObj)->GetId();
    		}
    
    
    		for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
    		{
    			CUser* pUser = g_UserMng.GetUserByPlayerID( m_vecPlayerID.at(i) );
    			if( IsValidObj( pUser ) )
    				pUser->SendColosseumReady2( m_nNextStage );
    		}
    }
    
    
    void CColosseumMatch::CreateRoomLayer()
    {
    	CWorld* pWorld = g_WorldMng.GetWorld( WI_WORLD_COLOSSEUM );
    	if( pWorld && !pWorld->m_linkMap.GetLinkMap( static_cast<int>( m_uPartyID ) ) )
    		pWorld->CreateLayer( static_cast<int>( m_uPartyID ) );
    }
    
    
    CUser* CColosseumMatch::GetUser( u_long uPlayerID )
    {
    	return g_UserMng.GetUserByPlayerID( uPlayerID );
    }
    
    
    void CColosseumMatch::EnterRoom( CUser* pUser )
    {
    	if( IsValidObj( pUser ) && m_bWaitTime && !IsTeleported( pUser->m_idPlayer ) )
    	{
    		m_vecPlayerID.push_back( pUser->m_idPlayer );
    		CWorld* pWorld = g_WorldMng.GetWorld( WI_WORLD_COLOSSEUM );
    		if( pWorld )
    			if( pWorld->m_linkMap.GetLinkMap( static_cast<int>( m_uPartyID ) ) )
    				{
    					pUser->SendColosseumStart( (int)(m_nNextStage) );
    					pUser->REPLACE( g_uIdofMulti, WI_WORLD_COLOSSEUM, D3DXVECTOR3( 1286.0F, 100.0F, 1087.0F ), REPLACE_NORMAL, static_cast<int>( m_uPartyID ) );
    				}
    	}
    }
    
    
    void CColosseumMatch::KickUser( u_long m_uPlayerID )
    {
    	for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
    		if( m_uPlayerID == m_vecPlayerID.at(i) )
    		{
    			CUser* pUser = g_UserMng.GetUserByPlayerID( m_vecPlayerID.at(i) );
    			if( IsValidObj( pUser ) )
    				pUser->REPLACE( g_uIdofMulti, WI_WORLD_MADRIGAL, D3DXVECTOR3( 6971.984f, 99.8f, 3336.884f ), REPLACE_NORMAL, nDefaultLayer );
    			m_vecPlayerID.erase(m_vecPlayerID.begin()+i);
    		}
    }
    
    
    void CColosseumMatch::EndWaitTime()
    {
    
    
    	if( m_bWaitTime )
    	{
    		m_nNextStage = (int)g_tmCurrent + (int)CColosseumMng::GetInstance()->nWaitAfterStage;
    		m_bWaitTime	 = FALSE;
    	}
    
    
    	for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
    	{
    
    
    		CUser* pUser = GetUser( m_vecPlayerID.at(i) );
    		if( IsValidObj( pUser ) )
    		{
    			pUser->SendColosseumStart(0);
    			pUser->SendColosseumReady1( m_nNextStage, m_nStage + 1 );
    		}
    	}
    }
    
    
    void CColosseumMatch::DestroyMover()
    {
    	m_nMoverID = NULL;
    	m_bWaitTime  = FALSE;
    
    
    	m_nNextStage = (int)g_tmCurrent + CColosseumMng::GetInstance()->nWaitAfterStage;
    
    
    	TCHAR strInt[2];
    	itoa( m_nStage, strInt, 10 );
    	for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
    	{
    		CUser* pUser = GetUser( m_vecPlayerID.at(i) );
    		if( IsValidObj( pUser ) )
    		{
    				CString strTemp;
    				strTemp.Format(_T( prj.GetText(TID_COLOSSEUM_COLOSUCCESS01) ), strInt ); 
    				pUser->AddText( strTemp );
    
    
    			if( m_nStage < CColosseumMng::GetInstance()->byMaxHardStage ) 
    			pUser->SendColosseumReady1( m_nNextStage, m_nStage + 1 );
    		}
    
    
    	}
    }
    
    
    void CColosseumMatch::EndMatch( BOOL bWin )
    {
    	for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
    	{
    		CUser* pUser = GetUser( m_vecPlayerID.at(i) );
    		if( IsValidObj( pUser ) )
    		{
    			pUser->SendColosseumEndMatch( bWin, ( g_tmCurrent - m_nStartTime ) );
    	
    			pUser->REPLACE( g_uIdofMulti, WI_WORLD_MADRIGAL, D3DXVECTOR3( 6971.984f, 99.8f, 3336.884f ), REPLACE_NORMAL, nDefaultLayer );
    		}
    	}
    	CColosseumMng::GetInstance()->DestroyMatch( m_uPartyID );
    }
    
    
    BOOL CColosseumMatch::IsTeleported( u_long m_uPlayerID )
    {
    		for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
    			if( m_vecPlayerID.at(i) == m_uPlayerID )
    				return TRUE;
    		return FALSE;
    }
    #endif //__COLOSSEUM

  5. #5
    Proficient Member n0tso1ee7 is offline
    MemberRank
    Nov 2015 Join Date
    180Posts

    Re: Colosseum Problem

    Quote Originally Posted by KetchupSamurai View Post
    Your using the non-update colosseum location from the old beta.

    Use this Colosseum.cpp instead.
    Spoiler:

    Code:
    #include "stdafx.h"
    #include "Colosseum.h"
    
    
    #ifdef __COLOSSEUM
    
    
    #include "defineText.h"
    #include "User.h"
    #include "worldmng.h"
    
    
    extern CWorldMng    g_WorldMng;
    extern CUserMng        g_UserMng;
    extern    CPartyMng    g_PartyMng;
    
    
    
    
    CColosseumMng::CColosseumMng()
    {
    }
    
    
    CColosseumMng::~CColosseumMng()
    {
    }
    
    
    CColosseumMng* CColosseumMng::GetInstance( void )
    {
        static CColosseumMng sColosseum;
        return &sColosseum;
    }
    
    
    BOOL CColosseumMng::CreateNewMatch( CUser* pUser, BYTE byDifficult, BYTE byMenu )
    {
            CParty* pParty = g_PartyMng.GetParty( pUser->GetPartyId() );
            if( pParty && IsValidObj( pUser ) )
            {
                if( GetMatchByParty( pParty ) != 0 ) return FALSE;
                if( !pUser->GetGuild() && byMenu == 2 ) return FALSE;
                if( byDifficult != 1 && byDifficult != 2 ) byDifficult = 1;
                if( byMenu != 1 && byMenu != 2 ) byMenu = 1;
                if( byDifficult == 1 && pUser->m_nLevel > 90 ) return FALSE;
    
    
                CColosseumMatch* pMatch = new CColosseumMatch;
                pMatch->m_uPartyID = pParty->m_uPartyId;
                pMatch->m_byDifficult = byDifficult;
                pMatch->m_byMenu = byMenu;
                if( byMenu == 2 )
                    pMatch->m_uGuildID = pUser->m_idGuild;
    
    
                if( byMenu == 1 )
                    pMatch->m_byBossStage = (BYTE)xRandom( 1, (BYTE)byMaxLowStage );
                else
                    pMatch->m_byBossStage = (BYTE)xRandom( 1, (BYTE)byMaxHardStage );
    
    
                pMatch->CreateRoomLayer();
    
    
                for( int i = 1; i < pParty->m_nSizeofMember; i++ )
                {
                    CUser* pPartyUser = g_UserMng.GetUserByPlayerID( pParty->m_aMember[i].m_uPlayerId );
                    if( pPartyUser )
                        if( pMatch->m_byMenu == 2 )
                        {
                            if( pPartyUser->m_idGuild == pMatch->m_uGuildID )
                                pPartyUser->SendColosseumEnter();
                        }
                        else
                            pPartyUser->SendColosseumEnter();
                }
    
    
                m_mapMatch.insert( make_pair( pParty->m_uPartyId, pMatch ));
                return TRUE;
            }
            return FALSE;
    }
    
    
    BOOL CColosseumMng::LoadScript()
    {
        if( m_Lua.RunScript( "Colosseum.lua" ) != 0 )
        {
            Error( "[CRITICAL] Colosseum.lua is missing." );
            exit(0);
        }
    
    
        nStartWaitTime = static_cast<int>( m_Lua.GetGlobalNumber( "StartWaitTime" ) );
        nWaitAfterStage = static_cast<int>( m_Lua.GetGlobalNumber( "WaitAfterStage" ) );
        byMaxLowStage    =    static_cast<BYTE>( m_Lua.GetGlobalNumber( "LowStages" ) );
        byMaxHardStage    =    static_cast<BYTE>( m_Lua.GetGlobalNumber( "HardStages" ) );
    
    
        m_Lua.GetGloabal( "tMonster" );
        m_Lua.PushNil();
    
    
        while( m_Lua.TableLoop( -2 ) )
        {
            __COLOSSEUM_MONSTER srMonster;
            srMonster.dwId = static_cast<int>( CScript::GetDefineNum( m_Lua.GetFieldToString( -1, "strMonsterId" ) ) );
            srMonster.nTime = static_cast<int>( m_Lua.GetFieldToNumber( -1, "nTime" ) );
            srMonster.nStage = static_cast<int>( m_Lua.GetFieldToNumber( -1, "nStage" ) );
            srMonster.nDifficult = static_cast<int>( m_Lua.GetFieldToNumber(-1, "nType" ) );
            m_vecMonster.push_back( srMonster );
            m_Lua.Pop(1);
        }
    
    
        m_Lua.Pop(0);
    
    
    
    
        return TRUE;
    }
    
    
    void CColosseumMng::DestroyMatch( u_long m_uPartyID )
    {
        COLOSSEUMMATCH::iterator it=m_mapMatch.find( m_uPartyID );
        if( it == m_mapMatch.end() )
            return;
            
        safe_delete ( it->second );
        m_mapMatch.erase( it );
    }
    
    
    void CColosseumMng::Process()
    {
        for( COLOSSEUMMATCH::iterator it = m_mapMatch.begin(); it != m_mapMatch.end(); it++ )
        {
            u_long idParty = it->first;
            CColosseumMatch* pMatch = it->second;
    
    
            if( !pMatch ) return;
    
    
            CMover* pMover = prj.GetMover(pMatch->m_nMoverID);
            if( pMover )
            {
                if( pMatch->m_nNextStage < (int)g_tmCurrent )
                    pMatch->EndMatch( FALSE );
            }
            else
            {
                if( pMatch->m_nNextStage < (int)g_tmCurrent )
                {
                    if( pMatch->m_nStage == 0 )
                    {
                        for( string::size_type i = 0; i < pMatch->m_vecPlayerID.size(); i++ )
                        {
                            CUser* pUser = pMatch->GetUser( pMatch->m_vecPlayerID.at(i) );
                            if( IsValidObj( pUser ) && pMatch->m_bWaitTime )
                                pUser->SendColosseumStart(0);
                        }
                    }
                    if( pMatch->m_nStage >= byMaxLowStage )
                        pMatch->EndMatch( TRUE );
                    else
                    {
                        pMatch->m_bWaitTime = FALSE;
                        pMatch->m_nStage++;
                        pMatch->CreateMover();
                    }
                }
            }
        }
    }
    
    
    CColosseumMatch* CColosseumMng::GetMatchByParty( CParty* pParty)
    {
        for( COLOSSEUMMATCH::iterator it = m_mapMatch.begin(); it != m_mapMatch.end(); it++ )
            if( pParty->m_uPartyId == it->first )
                return it->second;
    
    
        return NULL;
    }
    
    
    CColosseumMatch* CColosseumMng::GetMatchByMoverID( DWORD dwMoverID )
    {
        for( COLOSSEUMMATCH::iterator it = m_mapMatch.begin(); it != m_mapMatch.end(); it++ )
        {
            CColosseumMatch* cMatch = it->second;
            if( cMatch->m_nMoverID == dwMoverID )
                return cMatch;
        }
    
    
        return NULL;
    }
    
    
    CColosseumMatch::CColosseumMatch()
    {
        m_bWaitTime        = TRUE;
        m_nMoverID        = NULL;
        m_nStartTime    = g_tmCurrent;
        m_nStage        = 0;
        m_nNextStage    = (int)g_tmCurrent + CColosseumMng::GetInstance()->nStartWaitTime;
    }
    
    
    CColosseumMatch::~CColosseumMatch()
    {
        CWorld* pWorld = g_WorldMng.GetWorld( WI_WORLD_COLOSSEUM );
        if( pWorld && pWorld->m_linkMap.GetLinkMap( static_cast<int>( m_uPartyID ) ) )
            pWorld->Invalidate( m_uPartyID );
    }
    
    
    void CColosseumMatch::Process()
    {
    
    
    }
    
    
    void CColosseumMatch::CreateMover()
    {
            int nMoverID = 0;
    
    
            vector<__COLOSSEUM_MONSTER>    m_vecMobInfo = CColosseumMng::GetInstance()->m_vecMonster;
            for( string::size_type i = 0; i < m_vecMobInfo.size(); i++ )
            {
                if( m_nStage == m_byBossStage && m_vecMobInfo.at(i).nDifficult == m_byDifficult )
                {
                    nMoverID = m_vecMobInfo.at(i).dwId;
                    m_nNextStage = g_tmCurrent + m_vecMobInfo.at(i).nTime;
                }
                else
                    if( m_vecMobInfo.at(i).nDifficult == m_byDifficult && m_vecMobInfo.at(i).nStage == m_nStage )
                    {
                        nMoverID = m_vecMobInfo.at(i).dwId;
                        m_nNextStage = g_tmCurrent + m_vecMobInfo.at(i).nTime;
                    }
            }
    
    
            MoverProp* pMoverProp = prj.GetMoverPropEx( nMoverID );
            CWorld* pWorld = g_WorldMng.GetWorld( WI_WORLD_COLOSSEUM );
            if( pWorld && pMoverProp && pMoverProp->dwID != 0 )
            {
                        D3DXVECTOR3 vPos( 1296.0F, 100.0F, 1228.0F );
                        CObj* pObj    = CreateObj( D3DDEVICE, OT_MOVER, pMoverProp->dwID );
                        pObj->SetPos( vPos );
                        pObj->InitMotion( MTI_STAND );
                        pObj->UpdateLocalMatrix();
                        ((CMover*)pObj)->m_bActiveAttack = TRUE;
                        ((CMover*)pObj)->AddItToGlobalId();
                        pWorld->ADDOBJ( pObj, FALSE, m_uPartyID );
    
    
                m_nMoverID = ((CMover*)pObj)->GetId();
            }
    
    
            for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
            {
                CUser* pUser = g_UserMng.GetUserByPlayerID( m_vecPlayerID.at(i) );
                if( IsValidObj( pUser ) )
                    pUser->SendColosseumReady2( m_nNextStage );
            }
    }
    
    
    void CColosseumMatch::CreateRoomLayer()
    {
        CWorld* pWorld = g_WorldMng.GetWorld( WI_WORLD_COLOSSEUM );
        if( pWorld && !pWorld->m_linkMap.GetLinkMap( static_cast<int>( m_uPartyID ) ) )
            pWorld->CreateLayer( static_cast<int>( m_uPartyID ) );
    }
    
    
    CUser* CColosseumMatch::GetUser( u_long uPlayerID )
    {
        return g_UserMng.GetUserByPlayerID( uPlayerID );
    }
    
    
    void CColosseumMatch::EnterRoom( CUser* pUser )
    {
        if( IsValidObj( pUser ) && m_bWaitTime && !IsTeleported( pUser->m_idPlayer ) )
        {
            m_vecPlayerID.push_back( pUser->m_idPlayer );
            CWorld* pWorld = g_WorldMng.GetWorld( WI_WORLD_COLOSSEUM );
            if( pWorld )
                if( pWorld->m_linkMap.GetLinkMap( static_cast<int>( m_uPartyID ) ) )
                    {
                        pUser->SendColosseumStart( (int)(m_nNextStage) );
                        pUser->REPLACE( g_uIdofMulti, WI_WORLD_COLOSSEUM, D3DXVECTOR3( 1286.0F, 100.0F, 1087.0F ), REPLACE_NORMAL, static_cast<int>( m_uPartyID ) );
                    }
        }
    }
    
    
    void CColosseumMatch::KickUser( u_long m_uPlayerID )
    {
        for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
            if( m_uPlayerID == m_vecPlayerID.at(i) )
            {
                CUser* pUser = g_UserMng.GetUserByPlayerID( m_vecPlayerID.at(i) );
                if( IsValidObj( pUser ) )
                    pUser->REPLACE( g_uIdofMulti, WI_WORLD_MADRIGAL, D3DXVECTOR3( 6971.984f, 99.8f, 3336.884f ), REPLACE_NORMAL, nDefaultLayer );
                m_vecPlayerID.erase(m_vecPlayerID.begin()+i);
            }
    }
    
    
    void CColosseumMatch::EndWaitTime()
    {
    
    
        if( m_bWaitTime )
        {
            m_nNextStage = (int)g_tmCurrent + (int)CColosseumMng::GetInstance()->nWaitAfterStage;
            m_bWaitTime     = FALSE;
        }
    
    
        for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
        {
    
    
            CUser* pUser = GetUser( m_vecPlayerID.at(i) );
            if( IsValidObj( pUser ) )
            {
                pUser->SendColosseumStart(0);
                pUser->SendColosseumReady1( m_nNextStage, m_nStage + 1 );
            }
        }
    }
    
    
    void CColosseumMatch::DestroyMover()
    {
        m_nMoverID = NULL;
        m_bWaitTime  = FALSE;
    
    
        m_nNextStage = (int)g_tmCurrent + CColosseumMng::GetInstance()->nWaitAfterStage;
    
    
        TCHAR strInt[2];
        itoa( m_nStage, strInt, 10 );
        for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
        {
            CUser* pUser = GetUser( m_vecPlayerID.at(i) );
            if( IsValidObj( pUser ) )
            {
                    CString strTemp;
                    strTemp.Format(_T( prj.GetText(TID_COLOSSEUM_COLOSUCCESS01) ), strInt ); 
                    pUser->AddText( strTemp );
    
    
                if( m_nStage < CColosseumMng::GetInstance()->byMaxHardStage ) 
                pUser->SendColosseumReady1( m_nNextStage, m_nStage + 1 );
            }
    
    
        }
    }
    
    
    void CColosseumMatch::EndMatch( BOOL bWin )
    {
        for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
        {
            CUser* pUser = GetUser( m_vecPlayerID.at(i) );
            if( IsValidObj( pUser ) )
            {
                pUser->SendColosseumEndMatch( bWin, ( g_tmCurrent - m_nStartTime ) );
        
                pUser->REPLACE( g_uIdofMulti, WI_WORLD_MADRIGAL, D3DXVECTOR3( 6971.984f, 99.8f, 3336.884f ), REPLACE_NORMAL, nDefaultLayer );
            }
        }
        CColosseumMng::GetInstance()->DestroyMatch( m_uPartyID );
    }
    
    
    BOOL CColosseumMatch::IsTeleported( u_long m_uPlayerID )
    {
            for( string::size_type i = 0; i < m_vecPlayerID.size(); i++ )
                if( m_vecPlayerID.at(i) == m_uPlayerID )
                    return TRUE;
            return FALSE;
    }
    #endif //__COLOSSEUM
    I hope you have no issue with me asking this of you but could you explain where exactly the string that effects the OBJ placement is,
    I'm only asking because I'm trying to learn this sort of stuff for myself.
    I'm looking it all over and I can see the Void's and BOOL's used to enter the colosseum, check for parties, creates the proMovers and the world layer, my problem I guess is I just don't see anything that could handle the OBJ locations, could you or someone please go into a little detail for me as to were you see this, would mean a lot thanks!

  6. #6
    Enthusiast Ketchup is offline
    MemberRank
    Jan 2009 Join Date
    25Posts

    Re: Colosseum Problem

    sorry for the delay, havent been on here :p

    Code:
    pUser->REPLACE( g_uIdofMulti, WI_WORLD_COLOSSEUM, D3DXVECTOR3( 1286.0F, 100.0F, 1087.0F ), REPLACE_NORMAL, static_cast<int>( m_uPartyID )
    X = 1286.0F
    Y = 100.0F
    Z = 1087.0F

    Is the cords.

  7. #7
    Proficient Member n0tso1ee7 is offline
    MemberRank
    Nov 2015 Join Date
    180Posts

    Re: Colosseum Problem

    Quote Originally Posted by KetchupSamurai View Post
    sorry for the delay, havent been on here :p

    Code:
    pUser->REPLACE( g_uIdofMulti, WI_WORLD_COLOSSEUM, D3DXVECTOR3( 1286.0F, 100.0F, 1087.0F ), REPLACE_NORMAL, static_cast<int>( m_uPartyID )
    X = 1286.0F
    Y = 100.0F
    Z = 1087.0F

    Is the cords.

    Do not worry about the long wait as I'm simply asking for some help understanding the exact problem caused,
    I still cannot see where exactly the code that controls the data for the .o3d models are located, the list of cords you gave are the location the player/party spawns,

    The issue at hand was when viewing the map all of the objects loaded in the middle of the arena creating some odd cluster of models making it impossible to reach the Monsters as per what i gather and viewing the map with old Colosseum .o3d files and once I added the new ones to beast/map editing program the map seemed fixed, I'm trying to figure out if there is another way the source reads the map objects or if they are simply defined in the world folder through the lnd files. perhaps you simply misread the problem or maybe I'm wrong but any and all information on the subject is greatly appreciated.

    Sorry for taking this help thread so far off topic.
    Last edited by n0tso1ee7; 26-07-16 at 05:35 AM.



Advertisement