public MessageFactory()
 {
     _opCodeNamer = new OpCodeNamer(new Dictionary <ushort, string> {
         { 19900, "C_CHECK_VERSION" }
     });
     Version = 0;
     Region  = "Unknown";
 }
Exemple #2
0
 public TeraMessageReader(Message message, OpCodeNamer opCodeNamer, MessageFactory factory, OpCodeNamer sysMsgNamer)
     : base(GetStream(message), Encoding.Unicode)
 {
     Message     = message;
     OpCodeName  = opCodeNamer.GetName(message.OpCode);
     SysMsgNamer = sysMsgNamer;
     Factory     = factory;
 }
 public MessageFactory(OpCodeNamer opCodeNamer, string region, uint version, OpCodeNamer sysMsgNamer = null)
 {
     _opCodeNamer = opCodeNamer;
     _sysMsgNamer = sysMsgNamer;
     OpcodeNameToType.Clear();
     CoreServices.ToList().ForEach(x => OpcodeNameToType[_opCodeNamer.GetCode(x.Key)] = x.Value);
     OpcodeNameToType[0] = UnknownMessageDelegate;
     Version             = version;
     Region = region;
 }