OpcodeHelper.cs 700 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections.Generic;
  2. namespace Base
  3. {
  4. public static class OpcodeHelper
  5. {
  6. private static readonly HashSet<Opcode> needDebugLogMessageSet = new HashSet<Opcode>
  7. {
  8. Opcode.S2C_StartGame,
  9. Opcode.S2C_LoginBattleServer,
  10. Opcode.S2C_StartPickHero,
  11. Opcode.S2C_PlayerSelectHero,
  12. Opcode.C2S_PlayerSelectHero,
  13. Opcode.C2S_LoginBattleServer,
  14. Opcode.C2S_StartOb,
  15. Opcode.S2C_StartOb,
  16. Opcode.S2C_LoadingFinishStartGame,
  17. };
  18. public static bool IsNeedDebugLogMessage(Opcode opcode)
  19. {
  20. //return true;
  21. if ((ushort)opcode > 1000)
  22. {
  23. return true;
  24. }
  25. if (needDebugLogMessageSet.Contains(opcode))
  26. {
  27. return true;
  28. }
  29. return false;
  30. }
  31. }
  32. }