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