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.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);
- }
- }
- }
- }
- }
- }
|