mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 02:56:09 -04:00
(Hopefully) fixed issue with older McDzienny versions incrementing message type by 1 for each login and causing chat to move to top right or disappear, even though this shouldn't do anything as the MessageTypes extension was not sent to the client.
This commit is contained in:
parent
f497f6b623
commit
ed4d1f5195
@ -89,12 +89,13 @@ namespace ClassicalSharp {
|
||||
}
|
||||
|
||||
static string GetWoMTextString( byte[] data, ref byte messageType ) {
|
||||
messageType = (byte)CpeMessageType.Normal;
|
||||
int length = CopyTextStringToBuffer( data );
|
||||
int offset = 0;
|
||||
if( IsWomDetailString( length ) ) {
|
||||
length -= womDetail.Length;
|
||||
offset += womDetail.Length;
|
||||
messageType = 3;
|
||||
messageType = (byte)CpeMessageType.Status3;
|
||||
}
|
||||
return new String( characters, offset, length );
|
||||
}
|
||||
|
@ -402,7 +402,9 @@ namespace ClassicalSharp {
|
||||
case PacketId.Message:
|
||||
{
|
||||
byte messageType = reader.ReadUInt8();
|
||||
Console.WriteLine( messageType );
|
||||
string text = reader.ReadWoMTextString( ref messageType, useMessageTypes );
|
||||
Console.WriteLine( messageType + "," + text );
|
||||
Window.AddChat( text, messageType );
|
||||
} break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user