using XGame.Database; using XGame.Framework.Network; namespace FL.Network { public class ActMountPushCtrl : MsgController { protected override void OnProcess(ActMountPush message, object context) { MountData.Instance.universalId = message.id; MountData.Instance.exp = message.exp; MountData.Instance.mountModelId = message.use; MountData.Instance.useSkillMountId = message.useSkill; MountData.Instance.mountPartExp = message.bwExp; // (已解锁)高级坐骑升星数据 if (message.mountList != null) { var advancedMountsMap = MountData.Instance.AdvancedMountsMap; foreach (var item in message.mountList) { if (advancedMountsMap.ContainsKey(item.mountId)) { advancedMountsMap[item.mountId] = item.star; } else { advancedMountsMap.Add(item.mountId, item.star); } } } // 通用部位驯养情况 if (message.buwei != null) { var mountsPartsMap = MountData.Instance.MountsPartsMap; foreach (var item in message.buwei) { if (mountsPartsMap.ContainsKey(item.bwId)) { mountsPartsMap[item.bwId] = item.level; } else { mountsPartsMap.Add(item.bwId, item.level); } } } } } }