123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using FL.Data;
- using XGame.Framework.Network;
- namespace FL.Network
- {
- public class ActJobClassPushCtrl : MsgController<ActJobClassPush>
- {
- protected override void OnProcess(ActJobClassPush message, object context)
- {
- // 当前职业数据
- if (message.currentClass > 0)PlayerData.Instance.JobId = message.currentClass;
- // 最近重置过的职业id
- PlayerData.Instance.ResetJobId = message.resetClass;
- if (message.classHistory != null)
- {
- PlayerData.Instance.JobHistoryList.Clear();
- PlayerData.Instance.JobHistoryList.AddRange(message.classHistory);
- }
- // 方案列表
- if (message.runePlanName != null)
- {
- var runePlanNamesArray = PlayerData.Instance.RunePlanNamesArray;
- runePlanNamesArray.Clear();
- runePlanNamesArray.AddRange(message.runePlanName);
- }
- // 方案加点数据
- if (message.runePlan != null)
- {
- var runePlanMap = PlayerData.Instance.RunePlanMap;
- foreach (var item in message.runePlan)
- {
- if (runePlanMap.ContainsKey(item.id))
- {
- runePlanMap[item.id] = item;
- }
- else
- {
- runePlanMap.Add(item.id, item);
- }
- }
- }
- PlayerData.Instance.CurPlanIndex = message.currentPlan;
- PlayerData.Instance.AllPoint = message.allPoint;
- }
- }
- }
|