1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using XGame.Database;
- using XGame.Framework.Network;
- namespace FL.Network
- {
- public class ActMountPushCtrl : MsgController<ActMountPush>
- {
- protected override void OnProcess(ActMountPush message, object context)
- {
- MountData.Instance.UniversalId = message.id;
- MountData.Instance.UniversalExp = 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);
- }
- }
- }
- }
- }
- }
|