コード例 #1
0
	/* Not Used
	public void Recv_InDun_Create_Result(body_SC_INSTANCE_CREATE_RESULT data)
	{
		// InDun create failed
		_Error( data.eResult);
		Debug.Log( "Recv_InDun_Create_Result() - result code: " + data.eResult + ", InDunTableIndex: " + data.nIndunTableIndex);
	}
	
	public void Recv_InDun_Create(body_SC_INSTANCE_CREATE data)
	{
		m_nIndunTableIndex = data.nIndunTableIndex;
		m_nIndunDuplicationIndex = data.nIndunDuplicationIndex;
		
		// test, you want a indun
		Send_InDun_Enter();
	}
	*/
	
	public void Recv_InDun_Enter(body_SC_ENTER_INSTANCE_RESULT data, int nIndunTableIndex, bool bReconnect)
	{
		_RequestDimpleLog_Indun( 160404);

		// map load( field -> InDun)
		if( data.eResult == eRESULTCODE.eRESULT_SUCC)
		{
			m_bReconnect = bReconnect;
			AsUserInfo.Instance.SetCurrentUserCharacterPosition( data.vPosition);
			
			GameObject go = GameObject.Find( "SceneLoader");
			AsSceneLoader sceneLoader = go.GetComponent<AsSceneLoader>() as AsSceneLoader;
			
			Tbl_InDun_Record record = AsTableManager.Instance.GetInDunRecord( nIndunTableIndex);
			if( null == record)
			{
				Debug.LogError( "AsInstanceDungeonManager::Recv_InDun_Enter(), null == record, nIndunTableIndex: " + nIndunTableIndex);
				return;
			}
			
			if( 0 == record.IndunType) // 0: indun, 1: pvp
				sceneLoader.Load( data.nMapIndex, AsSceneLoader.eLoadType.INSTANCE_DUNGEON_ENTER);
			else
				sceneLoader.Load( data.nMapIndex, AsSceneLoader.eLoadType.ARENA_ENTER);
		}
		else
		{
			_Error( data.eResult);
			Debug.Log( "Recv_InDun_Enter() - result code: " + data.eResult + ", MapIndex: " + data.nMapIndex);
		}
	}
コード例 #2
0
	void Receive_Integrated_Indun_LogIn_Result( byte[] _packet)
	{
		body_SC_INTEGRATED_INDUN_LOGIN_RESULT result = new body_SC_INTEGRATED_INDUN_LOGIN_RESULT();
		result.PacketBytesToClass( _packet);
		
		// map load( field -> InDun)
		body_SC_ENTER_INSTANCE_RESULT data = new body_SC_ENTER_INSTANCE_RESULT();

		data.eResult = result.eResult;
		data.nMapIndex = result.nMapID;
		data.vPosition = result.vPosition;
		
		Debug.Log( "Receive_Integrated_Indun_LogIn_Result(), result: " + result.eResult + ", Index: " + result.nIndunTableIndex);
		
		PlayerBuffMgr.Instance.Clear();
		AsUserInfo.Instance.ClearBuff();
		AsPartyManager.Instance.PartyDiceRemoveAll();
		AsPartyManager.Instance.PartyUserRemoveAll();
		AsInstanceDungeonManager.Instance.Switch_GameUserSessionIndex( result.nSessionIndex);
		AsInstanceDungeonManager.Instance.Recv_InDun_Enter( data, result.nIndunTableIndex, result.bReconnect);
	}