Quote:
|
Originally Posted by Ravatar
That code has nothing to do with what Zippy does above, his clip converts a GM messagetype to a CommandPrefix at the beginning of the line of text, for Commands.Handle to work with.
|
Zippy wrote:
Code:
if ( (int)type == 0x0F ) // If the message is of type GM
The variable type can never be 0x0F. If the client sends a message with the type 0x0F (this is done when you use the GM: prompt) this code
Code:
if ( !Enum.IsDefined( typeof( MessageType ), type ) )
type = MessageType.Regular;
detects that there is no value in the MessageType enum that is equal to 0x0F, so it sets the type to MessageType.Regular;
Thus, when it arrives to PlayerMobile.DoSpeech the type is 0x00 (RegularSpeech) instead of 0x0F. You need to add the line I wrote into the core to prevent the core from changing type from 0x0F to 0x00.