CheatingDeathConfig.cs 895 B

1234567891011121314151617181920212223242526272829303132333435
  1. using CommonLang;
  2. using CommonLang.Property;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. namespace XmdsServerNode.CheatingDeath
  8. {
  9. /// <summary>
  10. /// 反作弊相关配置
  11. /// </summary>
  12. public class CheatingDeathConfig
  13. {
  14. [Desc("允许检测位移作弊")]
  15. public static bool ENABLE_MOVE_SPEED_CHECKER = true;
  16. [Desc("位移异常累加总和")]
  17. public static float TOTAL_EXCEPTION_MOVE_DISTANCE_LIMIT = 3.0f;
  18. [Desc("位移异常总和")]
  19. public static int TOTAL_EXCEPTION_COUNT = 2;
  20. [Desc("作弊者锁定时间")]
  21. public static int CHEATER_LOCK_TIME_MS = 15000;
  22. public static void Load(Properties cfg)
  23. {
  24. if (cfg != null)
  25. {
  26. cfg.LoadStaticFields(typeof(CheatingDeathConfig));
  27. }
  28. }
  29. }
  30. }