ActJobClassCurrentPlanPushCtrl.cs 872 B

12345678910111213141516171819202122232425262728
  1. using FL.Data;
  2. using XGame.Framework.Network;
  3. namespace FL.Network
  4. {
  5. public class ActJobClassCurrentPlanPushCtrl : MsgController<ActJobClassCurrentPlanPush>
  6. {
  7. protected override void OnProcess(ActJobClassCurrentPlanPush message, object context)
  8. {
  9. PlayerData.Instance.CurPlanIndex = message.currentPlan;
  10. if (message.runePlan?.Count > 0)
  11. {
  12. var runePlanMap = PlayerData.Instance.RunePlanMap;
  13. foreach (var item in message.runePlan)
  14. {
  15. if (runePlanMap.ContainsKey(item.id))
  16. {
  17. runePlanMap[item.id] = item;
  18. }
  19. else
  20. {
  21. runePlanMap.Add(item.id, item);
  22. }
  23. }
  24. }
  25. }
  26. }
  27. }