ActMountMountListPushCtrl.cs 830 B

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