ActItemPushCtrl.cs 583 B

123456789101112131415161718192021
  1. using FL.Data;
  2. using XGame.Framework.Network;
  3. namespace FL.Network
  4. {
  5. public class ActItemPushCtrl : MsgController<ActItemPush>
  6. {
  7. protected override void OnProcess(ActItemPush message, object context)
  8. {
  9. if (message?.act_item?.Count > 0)
  10. {
  11. foreach (var item in message.act_item)
  12. {
  13. ItemData.Instance.AddItemData(item.id, item.count);
  14. }
  15. EventSingle.Instance.Notify(EventDefine.UpdataItemData,message.act_item);
  16. }
  17. }
  18. }
  19. }