예제 #1
0
파일: Character.cs 프로젝트: karliky/wowwow
		public void ItemsUpdateForOther( PlayerHandler ph )
		{
			int t = 0;// all.Count;
			foreach( Item i in Items )
				if ( i != null )
					t++;
			int offset = 4;
			Converter.ToBytes( (short)1, tempBuff, ref offset );
			Converter.ToBytes( (int)0, tempBuff, ref offset );
			Converter.ToBytes( Guid, tempBuff, ref offset );
			ResetBitmap();
			int pos = 0;
			int last = 1;
			for( pos = 0;pos < 19;pos++)
			{
				Item i = Items[ pos ];
				if ( i != null )
				{
					setUpdateValue( (int)UpdateFields.PLAYER_VISIBLE_ITEM_1_0 + pos * 12, i.Id );
				}
				else
					setUpdateValue( (int)UpdateFields.PLAYER_VISIBLE_ITEM_1_0 + pos * 12, 0 );
			}
			pos = 0;
			for(int j = 0;j < 19;j++ )
			{
				Item i = Items[ j ];
				if ( i != null )
				{
					setUpdateValue( last = (int)UpdateFields.PLAYER_FIELD_INV_SLOT_HEAD + ( 2 * pos ), i.Guid  );	
				}		
				pos++;
			}
			FlushUpdateData( tempBuff, ref offset, 1 + ( last / 32 ) );
			ph.Send( 0xA9, tempBuff, offset );			
			return;
		}
예제 #2
0
파일: Mobile.cs 프로젝트: karliky/wowwow
		public void MovementHeartBeat( PlayerHandler ph, Character from )
		{
			if ( true )
			{/*
				byte []movePacket = { 0x00, 0x33, 0xDD, 0x00, 
										0x52, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
										0x6A, 0xFC, 0x3A, 0xC4, 
										0x7C, 0xBD, 0x96, 0xC5, 
										0x8B, 0x9D, 0xA0, 0x41, 

										0x00, 0x00, 0x00, 0x00, 
										0x00, 0x00, 0x00, 0x00, 
										0x00, 0xF6, 0x06, 0x00, 
										0x00, 
										0x01, 0x00, 0x00, 0x00, 
										0x16, 0xE4, 0x39, 0xC4, 
										0x71, 0xBB, 0x96, 0xC5, 
										0xD2, 0xE5, 0xA6, 0x41};

*/
				byte []movePacket = { 	0,0,0,0,
										0xD1, 0x1C, 0x25, 0x00, 
										0x00, 0xA0, 0x00, 0xF0, 

										0x50, 0x45, 0xD4, 0xC3, 
										0x26, 0xDE, 0x21, 0xC5, 
										0x79, 0xCF, 0xBF, 0x42, 
										0x00, 0x00, 0x00, 0x00, 
										0x00, 0x00, 0x00, 0x00, 
										0x00, 
										0x00, 0x00, 0x00, 0x00, 
										0x01, 0x00, 0x00, 0x00, 
										
										0x50, 0x45, 0xD4, 0xC3, 
										0x26, 0xDE, 0x21, 0xC5, 
										0x79, 0xCF, 0xBF, 0x42
									};
				int offset = 4;
				Converter.ToBytes( Guid, movePacket, ref offset );	
				Converter.ToBytes( (float)from.X, movePacket, ref offset );//	X
				Converter.ToBytes( (float)from.Y, movePacket, ref offset );//	Y
				Converter.ToBytes( (float)from.Z, movePacket, ref offset );//	Z			
				Converter.ToBytes( (int)0, movePacket, ref offset );//	Z		
				Converter.ToBytes( (int)0, movePacket, ref offset );//	Z		
				Converter.ToBytes( (byte)0, movePacket, ref offset );//	Z		
				Converter.ToBytes( (int)0x23F, movePacket, ref offset );//	Z			
				Converter.ToBytes( (int)1, movePacket, ref offset );//	Z		
				Converter.ToBytes( (float)from.X + 20, movePacket, ref offset );//	X
				Converter.ToBytes( (float)from.Y, movePacket, ref offset );//	Y
				Converter.ToBytes( (float)from.Z, movePacket, ref offset );//	Z
				ph.Send( 0xDD, movePacket, offset );
			}
		}