ActMountBuweiPushCtrl.cs 788 B

1234567891011121314151617181920212223242526
  1. using XGame.Framework.Network;
  2. namespace FL.Network
  3. {
  4. public class ActMountBuweiPushCtrl : MsgController<ActMountBuweiPush>
  5. {
  6. protected override void OnProcess(ActMountBuweiPush message, object context)
  7. {
  8. if (message.buwei?.Count > 0)
  9. {
  10. var mountsPartsMap = MountData.Instance.MountsPartsMap;
  11. foreach (var item in message.buwei)
  12. {
  13. if (mountsPartsMap.ContainsKey(item.bwId))
  14. {
  15. mountsPartsMap[item.bwId] = item.level;
  16. }
  17. else
  18. {
  19. mountsPartsMap.Add(item.bwId, item.level);
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }