123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- using FL.Network;
- using XGame.Framework.Data;
- using XGame.Framework.Network;
- namespace FL.Data
- {
- public class PlayerService : DataSingleton<PlayerService>
- {
- /// <summary>
- /// 请求身上穿戴的装备信息
- /// </summary>
- public void SendToEquipInto()
- {
- if (EquipData.Instance.IsWearEquipEmpty())
- {
- NetModule.Request(new EquipIntoEquipRequest() { });
- }
- }
- /// <summary>
- /// 请求转职
- /// </summary>
- /// <param name="jobId"></param>
- public void SendToTransfer(int jobId)
- {
- var msg = new JobClassChangeRequest()
- {
- classId = jobId
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 请求重置转职
- /// </summary>
- public void SendToResetJob()
- {
- NetModule.Request(new JobClassResetRequest() { });
- }
- /// <summary>
- /// 请求随机觉醒(激活)符文
- /// </summary>
- public void SendToWakeupRune()
- {
- NetModule.Request(new JobClassRuneActivateRequest() { });
- }
- /// <summary>
- /// 请求提升某个符文的等级
- /// </summary>
- /// <param name="runeId"></param>
- /// <param name="addLv"></param>
- public void SendToUpgradeRune(int runeId, int addLv)
- {
- var msg = new JobClassSlotLvUpRequest()
- {
- id = runeId,
- addLv = addLv
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 请求更换印记符文类型
- /// </summary>
- /// <param name="runeType"></param>
- public void SendToChangeRuneType(int planIndex, int slotId, int runeType)
- {
- var msg = new JobClassRuneChangeRequest()
- {
- planId = planIndex,
- slotId = slotId,
- type = runeType
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 请求更换符文方案
- /// </summary>
- /// <param name="planIndex"></param>
- public void SendToChangePlanIndex(int planIndex)
- {
- var msg = new JobClassChangePlanRequest()
- {
- planId = planIndex.ToString(),
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 请求重置当前方案
- /// </summary>
- public void SendToResetPlan()
- {
- NetModule.Request(new JobClassResetPlanRequest() { });
- }
- /// <summary>
- /// 请求修改符文方案名字
- /// </summary>
- /// <param name="name"></param>
- /// <param name="planIndex"></param>
- public void SendToAlterPlanName(string name, int planIndex)
- {
- var msg = new JobClassRunePlanNameRequest()
- {
- str = name,
- planId = planIndex.ToString(),
- };
- NetModule.Request(msg);
- }
- }
- }
|