123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- using FL.Network;
- using XGame.Framework.Data;
- using XGame.Framework.Network;
- namespace FL
- {
- public class MountService : DataSingleton<MountService>
- {
- public int UpgradeMountId { set; get; } // 请求升星的高级坐骑id
- public int MountStarLv { set; get; } // 高级坐骑升星前的星级
- /// <summary>
- /// 坐骑激活功能时初始化,只需请求一次(解锁坐骑功能时请求)
- /// </summary>
- public void SendTo()
- {
- NetModule.Request(new MountMountInitRequest() { });
- }
- /// <summary>
- /// 请求坐骑相关数据
- /// </summary>
- public void SendToMountData()
- {
- NetModule.Request(new MountIntoRequest() { });
- }
- /// <summary>
- /// 一键提升通用坐骑(喂养)
- /// </summary>
- public void SendToOneKeyFeedMount()
- {
- NetModule.Request(new MountTiShengAllRequest() { });
- }
- /// <summary>
- /// 通用坐骑(喂养)提升
- /// </summary>
- public void SendToFeedMount()
- {
- NetModule.Request(new MountTishengRequest() { });
- }
- /// <summary>
- /// 启用高级坐骑技能
- /// </summary>
- /// <param name="mountId">坐骑id</param>
- public void SendToEnableAdvancedSkill(int mountId)
- {
- var msg = new MountUseSkillRequest()
- {
- mountId = mountId
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 取消高级坐骑技能
- /// </summary>
- public void SendToCancelAdvancedSkill()
- {
- NetModule.Request(new MountSkillDownRequest() { });
- }
- /// <summary>
- /// 坐骑上阵(骑乘)
- /// </summary>
- /// <param name="mountId"></param>
- public void SendToRideMount(int mountId)
- {
- var msg = new MountShangzhenRequest()
- {
- mountId = mountId
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 下坐骑
- /// </summary>
- public void SendToRideDown()
- {
- NetModule.Request(new MountDownRequest() { });
- }
- /// <summary>
- /// 坐骑部位一键驯养
- /// </summary>
- public void SendToOneKeyTraining()
- {
- NetModule.Request(new MountXunyangAllRequest() { });
- }
- /// <summary>
- /// 坐骑部位驯养
- /// </summary>
- public void SendToTrainingMountPart()
- {
- NetModule.Request(new MountXunyangRequest() { });
- }
- /// <summary>
- /// 请求解锁某个高级坐骑
- /// </summary>
- /// <param name="mountId"></param>
- public void SendToUnlockAdvancedMount(int mountId)
- {
- var msg = new MountAddMountRequest()
- {
- mountId = mountId
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 高级坐骑升星
- /// </summary>
- /// <param name="mountId"></param>
- public void SendToUpgradeStar(int mountId)
- {
- UpgradeMountId = mountId;
- MountStarLv = MountData.Instance.GetAdvancedMountLv(mountId);
- var msg = new MountUpStarRequest()
- {
- mountId = mountId
- };
- NetModule.Request(msg);
- }
- }
- }
|