OpcodeHelper.cs 502 B

12345678910111213141516171819202122232425262728
  1. using System.Collections.Generic;
  2. namespace ETModel
  3. {
  4. public static class OpcodeHelper
  5. {
  6. private static readonly HashSet<ushort> ignoreDebugLogMessageSet = new HashSet<ushort>
  7. {
  8. OuterOpcode.C2R_Ping,
  9. OuterOpcode.R2C_Ping,
  10. };
  11. public static bool IsNeedDebugLogMessage(ushort opcode)
  12. {
  13. if (ignoreDebugLogMessageSet.Contains(opcode))
  14. {
  15. return false;
  16. }
  17. return true;
  18. }
  19. public static bool IsClientHotfixMessage(ushort opcode)
  20. {
  21. return opcode > 10000;
  22. }
  23. }
  24. }