OpcodeHelper.cs 512 B

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