ActLongdanItemsPushCtrl.cs 826 B

123456789101112131415161718192021222324252627
  1. using FL.Data;
  2. using XGame.Framework.Network;
  3. namespace FL.Network
  4. {
  5. public class ActLongdanItemsPushCtrl : MsgController<ActLongdanItemsPush>
  6. {
  7. protected override void OnProcess(ActLongdanItemsPush message, object context)
  8. {
  9. if (message?.items.Count > 0)
  10. {
  11. DragonEggData.Instance.DropItems = message.items;
  12. foreach (var item in message.items)
  13. {
  14. if (item != null)
  15. {
  16. if (item?.count > 0)
  17. {
  18. // 非装备类型的道具物品
  19. ItemData.Instance.AddItemData(item.id, item.count, true);
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }
  26. }