Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 04-22-2016, 05:56 PM
Tyen05
Discordant
 
Join Date: Mar 2009
Location: eqbrowser.com
Posts: 309
Default

OP_ChannelMessage (Client->Server), work in progress.

Main Bottleneck is at the very bottom.
//TODO: Reading ChannelMessage string is suppose to be variable sized and not a 64 FixedLengthString.


Client->Server Packet logs
Quote:
[04-22-2016 :: 15:07:44] [Packet :: Client -> Server] [OP_ChannelMessage - 0x0045] [Size: 286]
[04-22-2016 :: 15:07:44] [Packet :: Client -> Server (Dump)] [OP_ChannelMessage - 0x0045] [Size: 286]
0: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
16: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
32: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
48: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
64: 4A 6F 6E 64 73 00 00 00 - 00 00 00 00 00 00 00 00 | Jonds...........
80: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
96: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
112: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
128: 00 00 00 00 05 00 00 00 - 00 00 00 00 46 46 46 46 | ............FFFF
144: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
160: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
176: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
192: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
208: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
224: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
240: 46 46 46 46 78 00 00 00 - 00 00 00 00 00 00 00 00 | FFFFx...........
256: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
272: 00 00 00 00 00 00 00 00 - 00 00 00 00 | ............

[04-22-2016 :: 15:07:44] [Zone Server] Client::ChannelMessageReceived() Channel:5 message:'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFx'
Server->Client Packet logs
Quote:
[04-22-2016 :: 15:07:44] [Packet :: Server -> Client] [OP_ChannelMessage - 0x0045] [Size: 248]
[04-22-2016 :: 15:07:44] [Packet :: Server -> Client (Dump)] [OP_ChannelMessage - 0x0045] [Size: 248]
0: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
16: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
32: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
48: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
64: 4A 6F 6E 64 73 00 00 00 - 00 00 00 00 00 00 00 00 | Jonds...........
80: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
96: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
112: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 | ................
128: 00 00 00 00 05 00 00 00 - 64 00 00 00 46 46 46 46 | ........d...FFFF
144: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
160: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
176: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
192: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
208: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
224: 46 46 46 46 46 46 46 46 - 46 46 46 46 46 46 46 46 | FFFFFFFFFFFFFFFF
240: 46 46 46 46 78 00 | FFFFx.
Client Send Chat message
Code:
		public void DoChannelMessage()
		{
			
//			/*000*/	char	targetname[64];		// Tell recipient
//			/*064*/	char	sender[64];			// The senders name (len might be wrong)
//			/*128*/	uint32	language;			// Language
//			/*132*/	uint32	chan_num;			// Channel
//			/*144*/	uint32	skill_in_language;	// The players skill in this language? might be wrong
//			/*148*/	char	message[0];			// Variable length message
		
		string TestMessage = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFx";
		int TestMessageLength = TestMessage.Length * 2;
		int RequestSize = 74 + TestMessageLength;
		byte[] ChannelMessageRequest = new byte[RequestSize];
		int position = 0;
		
				
		WriteFixedLengthString("", ref ChannelMessageRequest, ref position, 64);
		WriteFixedLengthString("Jonds", ref ChannelMessageRequest, ref position, 64);
		WriteInt32(0, ref ChannelMessageRequest, ref position);
		WriteInt32(5, ref ChannelMessageRequest, ref position);
		WriteInt32(0, ref ChannelMessageRequest, ref position);
		WriteFixedLengthString(TestMessage, ref ChannelMessageRequest, ref position, TestMessageLength);
		GenerateAndSendWorldPacket (ChannelMessageRequest.Length, 69 /* OP_ChannelMessage */, curZoneId, curInstanceId, ChannelMessageRequest);				
		}



Client Read Chat message
Code:
		public void HandleWorldMessage_ChannelMessage(byte[] data, int datasize)
		{
			
//			/*000*/	char	targetname[64];		// Tell recipient
//			/*064*/	char	sender[64];			// The senders name (len might be wrong)
//			/*128*/	uint32	language;			// Language
//			/*132*/	uint32	chan_num;			// Channel
//			/*144*/	uint32	skill_in_language;	// The players skill in this language? might be wrong
//			/*148*/	char	message[0];			// Variable length message
	
		int position = 0;
		
		string ChannelTargetName = ReadFixedLengthString(data, ref position, 64);
		string ChannelSender = ReadFixedLengthString(data, ref position, 64);
		Int32 ChannelLanguage = ReadInt32(data, ref position);
		Int32 ChannelNumber = ReadInt32(data, ref position);
		Int32 ChannelSkill = ReadInt32(data, ref position);

		//TODO: ChannelMessage is suppose to be variable sized and not a 64 FixedLengthString
		string ChannelMessage = ReadFixedLengthString(data, ref position, 64);

		}

Fixed Length String reference
Code:
		public string ReadFixedLengthString(byte[] data, ref Int32 position, Int32 count)
		{
			string retval = System.Text.Encoding.Default.GetString(data, position, count);
			position += count;
			return retval;
		}
__________________
Browser based EQ project
Reply With Quote
 

Tags
pras eqbrowser.com, unity3d


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:47 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3