ActLongdanTreasureIdPushCtrl.cs 990 B

123456789101112131415161718192021222324252627
  1. using FL.Data;
  2. using XGame.Framework.Network;
  3. namespace FL.Network
  4. {
  5. public class ActLongdanTreasureIdPushCtrl : MsgController<ActLongdanTreasureIdPush>
  6. {
  7. protected override void OnProcess(ActLongdanTreasureIdPush message, object context)
  8. {
  9. DragonEggData.Instance.DragonTreasureId = message.treasureId;
  10. DragonEggData.Instance.DragonTreasureSocre = message.progress;
  11. if (message.items != null && message.items.Count > 0)
  12. {
  13. if (DragonEggData.Instance.DragonTreasureRewardItems == null)
  14. {
  15. DragonEggData.Instance.DragonTreasureRewardItems = new System.Collections.Generic.List<KindItem>();
  16. }
  17. else
  18. {
  19. DragonEggData.Instance.DragonTreasureRewardItems.Clear();
  20. }
  21. DragonEggData.Instance.DragonTreasureRewardItems.AddRange(message.items);
  22. }
  23. }
  24. }
  25. }