public static void ProfileReq( NetState state, PacketReader pvSrc )
{
int type = pvSrc.ReadByte();
Serial serial = pvSrc.ReadInt32();
Mobile beholder = state.Mobile;
Mobile beheld = World.FindMobile( serial );
if ( beheld == null )
return;
switch ( type )
{
case 0x00: // display request
{
EventSink.InvokeProfileRequest( new ProfileRequestEventArgs( beholder, beheld ) );
break;
}
case 0x01: // edit request
{
pvSrc.ReadInt16(); // Skip
int length = pvSrc.ReadUInt16();
if ( length > 511 )
return;
string text = pvSrc.ReadUnicodeString( length );
EventSink.InvokeChangeProfileRequest( new ChangeProfileRequestEventArgs( beholder, beheld, text ) );
break;
}
}
}