Esempio n. 1
0
	public virtual void SetParyPositionInfo( body2_SC_PARTY_USER_POSITION[] _info )
	{
		if( false == m_WorldMapDlg.isOpenWorldMap )
			return;		
		
		m_PartyList.Clear();
		m_WorldMapDlg.worldMap.ClearPartyImg();
		
		
		Tbl_ZoneMap_Record selfrecord = AsTableManager.Instance.GetZoneMapRecord( TerrainMgr.Instance.GetCurMapID() );
		if( null == selfrecord)
		{
			AsUtil.ShutDown("WorldMapDlg::OpenWaypointMap()[ null == Tbl_ZoneMap_Record ] id : " + TerrainMgr.Instance.GetCurMapID() );
			return;
		}		
		
		foreach( body2_SC_PARTY_USER_POSITION _data in _info )
		{
			Tbl_ZoneMap_Record _zoneRecord = AsTableManager.Instance.GetZoneMapRecord( _data.nMapIdx );
			if( null == _zoneRecord )
				continue;		
			
			if( m_PartyList.ContainsKey( _zoneRecord.getAreaMapIdx ) )
			{
				m_PartyList[_zoneRecord.getAreaMapIdx] += 1;
			}
			else
			{
				m_PartyList.Add( _zoneRecord.getAreaMapIdx, 1 );
			}
		}
		
		if( m_PartyList.ContainsKey( selfrecord.getAreaMapIdx ) )
		{
			m_PartyList[selfrecord.getAreaMapIdx] += 1;
		}
		else
		{
			m_PartyList.Add( selfrecord.getAreaMapIdx, 1 );
		}
		
		if( m_PartyList.Count > 0 )
		{			
			
			foreach( KeyValuePair<int, int> pair in m_PartyList )
			{
				m_WorldMapDlg.worldMap.SetPartyImg( pair.Key, pair.Value, selfrecord.getAreaMapIdx );
			}
		}
		else
		{
			SetNoPartyImg();
		}
	}
Esempio n. 2
0
	public void SetParyPositionInfo( body2_SC_PARTY_USER_POSITION[] _info )
	{
		if( false == m_WorldMapDlg.isOpenAreaMap )
			return;
		
		m_ServerPartyUserList = _info;
		
		m_PartyList.Clear();
		m_WorldMapDlg.areaMap.ClearPartyImg();
		
		
		foreach( body2_SC_PARTY_USER_POSITION _data in _info )
		{
			if( m_PartyList.ContainsKey( _data.nMapIdx ) )
			{
				m_PartyList[_data.nMapIdx] += 1;
			}
			else
			{
				m_PartyList.Add( _data.nMapIdx, 1 );
			}
		}
		
		if( m_PartyList.Count > 0 )		
		{
			foreach( KeyValuePair<int, int> pair in m_PartyList )
			{
				m_WorldMapDlg.areaMap.SetPartyImg( pair.Key, pair.Value, TerrainMgr.Instance.GetCurMapID() );
			}
		}
		else
		{
			SetNoPartyImg();
		}
		
		ResetPartyNameList();
	}
Esempio n. 3
0
	public void SetParyPositionInfo( body2_SC_PARTY_USER_POSITION[] _partyUserInfoList)
	{
		if( false == m_WorldMapDlg.isOpenZoneMap)
		{
			AsUtil.ShutDown( "ZoneLogic::SetParyPositionInfo()[ false == m_WorldMapDlg.isOpenZoneMap ]");
			return;
		}

		m_WorldMapDlg.zoneMap.ClearPartyPlayer();

		for( int i = 0; i < _partyUserInfoList.Length; ++i)
		{
			if( m_curMap.MapData.GetID() != _partyUserInfoList[i].nMapIdx)
				continue;

			AS_PARTY_USER user = AsPartyManager.Instance.GetPartyMember( _partyUserInfoList[i].nCharUniqKey);
			if( null == user)
			{
				Debug.LogError( "ZoneLogic::SetParyPositionInfo()[ not find : " + _partyUserInfoList[i].nCharUniqKey);
				continue;
			}
			m_WorldMapDlg.zoneMap.SetPartyPlayer( user.strCharName, i, GetRatioPos( _partyUserInfoList[i].sPosition), GetMapMin(), GetMapMax());
		}
	}
Esempio n. 4
0
	public new void PacketBytesToClass( byte[] data)
	{
		Type infotype = this.GetType();
		FieldInfo headerinfo = null;

		int index = ParsePacketHeader( data);

		// nCharCnt
		byte[] charCnt = new byte[ sizeof( Int32)];
		headerinfo = infotype.GetField( "nCharCnt", BINDING_FLAGS_PIG);
		Buffer.BlockCopy( data, index, charCnt, 0, sizeof( Int32));
		headerinfo.SetValue( this, BitConverter.ToInt32( charCnt, 0));
		index += sizeof( Int32);

		body = new body2_SC_PARTY_USER_POSITION[nCharCnt];
		for( int i = 0; i < nCharCnt; i++)
		{
			body[i] = new body2_SC_PARTY_USER_POSITION();
			
			byte[] tmpData = new byte[body2_SC_PARTY_USER_POSITION.size];
			Buffer.BlockCopy( data, index, tmpData, 0, tmpData.Length);
			body[i].ByteArrayToClass( tmpData);
			index += body2_SC_PARTY_USER_POSITION.size;
		}
	}