コード例 #1
0
	public void ReceiveInsertDropItems( AS_body1_SC_DROPITEM_APPEAR result) 
	{
		foreach( AS_body2_SC_DROPITEM_APPEAR data in result.body)
		{
			Debug.Log( "owner: " + data.nOwner + "idx: " + data.nDropItemIdx + "userid :" + AsEntityManager.Instance.UserEntity.UniqueId );
			
			if( 0 == data.nOwner || 
				( ( 0!=data.nOwner) && ( AsEntityManager.Instance.UserEntity.UniqueId == data.nOwner)) ||
				( 0!=AsPartyManager.Instance.PartyIdx && data.nPartyIdx == AsPartyManager.Instance.PartyIdx))
			{
				Debug.Log( "droped owner: " + data.nOwner + "idx: " + data.nDropItemIdx + "userid :" + AsEntityManager.Instance.UserEntity.UniqueId );
				Item item = ItemMgr.ItemManagement.GetItem( data.nItemTableIdx);
				if( null == item)
				{
					Debug.LogError( "DropItemAppear [Item id == null]. item id : " + data.nItemTableIdx);
					continue;
				}
				
				if( false == IsExistReceviedDrop( data.nDropItemIdx))
				{
					m_ReceiveList.Add( data.nDropItemIdx);
					receiveItemList.Add( data);
				}
				else
				{
					Debug.LogError( "DropItemAppear()[false != IsExistReceviedDrop] idx " + data.nDropItemIdx);
				}
			}
		}

#if UNITY_EDITOR
		if( ( null == AssetbundleManager.Instance) || ( true != AssetbundleManager.Instance.useAssetbundle))
		{
			foreach( AS_body2_SC_DROPITEM_APPEAR _data in receiveItemList)
			{
				InsertDropItem( _data);
			}
			
			receiveItemList.Clear();
		}
#endif
	}
コード例 #2
0
ファイル: AsCommonProcess.cs プロジェクト: ftcaicai/ArkClient
    /*
     * Packet Define: IC_DROPITEM_APPEAR
    */
    private void DropItemAppear( byte[] _packet)
    {
        AS_body1_SC_DROPITEM_APPEAR result = new AS_body1_SC_DROPITEM_APPEAR();
        result.PacketBytesToClass( _packet);

		ItemMgr.DropItemManagement.ReceiveInsertDropItems( result);
#if !UNITY_EDITOR
		if( null != AssetbundleManager.Instance && true == AssetbundleManager.Instance.useAssetbundle)
		{
			if( false == DropItemManagement.IsStarted)
				StartCoroutine( ItemMgr.DropItemManagement.Visualize());
		}
#endif
  	}