ActShengbingShangzhenPushCtrl.cs 766 B

123456789101112131415161718192021222324
  1. using FL.Data;
  2. using XGame.Framework.Network;
  3. namespace FL.Network
  4. {
  5. public class ActShengbingShangzhenPushCtrl : MsgController<ActShengbingShangzhenPush>
  6. {
  7. protected override void OnProcess(ActShengbingShangzhenPush message, object context)
  8. {
  9. foreach (var cao in message.shangzhen)
  10. {
  11. if (PartnersData.Instance.UpSbMap.TryGetValue(cao.caoId, out var id))
  12. {
  13. PartnersData.Instance.UpSbMap.Remove(cao.caoId);
  14. PartnersData.Instance.UpSbMap.Add(cao.caoId, cao.sbId);
  15. }
  16. else
  17. {
  18. PartnersData.Instance.UpSbMap.Add(cao.caoId, cao.sbId);
  19. }
  20. }
  21. }
  22. }
  23. }