ActPvePveIdPushCtrl.cs 795 B

123456789101112131415161718192021222324252627
  1. using FL.Data;
  2. using XGame.Database;
  3. using XGame.Framework.Network;
  4. namespace FL.Network
  5. {
  6. public class ActPvePveIdPushCtrl : MsgController<ActPvePveIdPush>
  7. {
  8. protected override void OnProcess(ActPvePveIdPush message, object context)
  9. {
  10. var pveData = PveData.Instance;
  11. // 服务端记录的是已通关的章节id,新账号记录是零
  12. if (message.pveId > 0)
  13. {
  14. var chapter = ChapterTableRepo.Next(message.pveId);
  15. // 取下一关的id
  16. pveData.chapterId = chapter?.Id ?? message.pveId;
  17. }
  18. else
  19. {
  20. pveData.chapterId = 10010101;
  21. }
  22. pveData.pveId = message.pveId;
  23. pveData.fightKey = message.fightKey;
  24. }
  25. }
  26. }