ActLongdanTreasureIdPushCtrl.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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. if (message.treasureId != null)
  10. {
  11. DragonEggData.Instance.DragonTreasureId = message.treasureId;
  12. }
  13. if (message.progress != null)
  14. {
  15. DragonEggData.Instance.DragonTreasureSocre = message.progress;
  16. }
  17. if (message.items != null && message.items.Count > 0)
  18. {
  19. if (DragonEggData.Instance.DragonTreasureRewardItems == null)
  20. {
  21. DragonEggData.Instance.DragonTreasureRewardItems = new System.Collections.Generic.List<KindItem>();
  22. }
  23. else
  24. {
  25. DragonEggData.Instance.DragonTreasureRewardItems.Clear();
  26. }
  27. DragonEggData.Instance.DragonTreasureRewardItems.AddRange(message.items);
  28. }
  29. }
  30. }
  31. }