123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
-
- using FL.Network;
- using XGame.Framework.Data;
- using XGame.Framework.Network;
- namespace FL
- {
- /// <summary>
- /// 神器消息交互
- /// </summary>
- public class ArtifactService : DataSingleton<ArtifactService>
- {
- #region 普通神器
- /// <summary>
- /// 请求神器相关数据
- /// </summary>
- public void SendToArtifactData()
- {
- NetModule.Request(new ArtifactIntoRequest() { });
- }
- /// <summary>
- /// 一键升级神器(一键锤炼按钮事件)
- /// </summary>
- public void SendToUpgradeArtifactByOneKey()
- {
- NetModule.Request(new ArtifactTiShengAllRequest() { });
- }
- /// <summary>
- /// 升级神器(锤炼按钮事件)
- /// </summary>
- public void SendToUpgradeArtifact()
- {
- NetModule.Request(new ArtifactTishengRequest() { });
- }
- #endregion
- #region 高级(皮肤)神器
- /// <summary>
- /// 请求升星的高级神器id
- /// </summary>
- public int UpgradeArtifactId { get; set; }
- /// <summary>
- /// 升星前神器的星级
- /// </summary>
- public int ArtifactStarLv { get; set; }
- /// <summary>
- /// 请求解锁某个高级神器(皮肤)
- /// </summary>
- /// <param name="mountId"></param>
- public void SendToUnlockArtifact(int artifactId)
- {
- var msg = new ArtifactAddArtifactRequest()
- {
- artifactId = artifactId
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 启用高级神器技能
- /// </summary>
- /// <param name="artifactId"></param>
- public void SendToUseArtifactSkill(int artifactId)
- {
- var msg = new ArtifactUseSkillRequest()
- {
- artifactId = artifactId
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 取消高级神器技能的使用
- /// </summary>
- public void SendCancelUseArtifactSkill()
- {
- NetModule.Request(new ArtifactSkillDownRequest() { });
- }
- /// <summary>
- /// 高级神器升级(升星)
- /// </summary>
- /// <param name="artifactId"></param>
- public void SendToUpgradeAdvaceActifact(int artifactId)
- {
- UpgradeArtifactId = artifactId;
- ArtifactStarLv = ArtifactData.Instance.GetAdvancedArtifactLevel(artifactId);
- var msg = new ArtifactUpStarRequest()
- {
- artifactId = artifactId
- };
- NetModule.Request(msg);
- }
- #endregion
- #region 神器附魔
- /// <summary>
- /// 附魔(元素上阵)
- /// </summary>
- /// <param name="elementId"></param>
- public void SendToWearElement(int elementId)
- {
- var msg = new ArtifactUseElementRequest()
- {
- elementId = elementId
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 取消附魔(元素下阵)
- /// </summary>
- /// <param name="elementType">元素类型</param>
- /// <param name="holePosition">孔位</param>
- public void SendToDisbandElement(int elementType, int holePosition)
- {
- var msg = new ArtifactDownElementRequest()
- {
- type = elementType,
- buwei = holePosition
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 元素升级
- /// </summary>
- /// <param name="elementId"></param>
- public void SendToUpgradeElement(int elementId)
- {
- var msg = new ArtifactUpElementRequest()
- {
- elementId = elementId
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 元素一键升级
- /// </summary>
- /// <param name="elementType"></param>
- public void SendToUpgradeElementByOnekey(int elementType)
- {
- var msg = new ArtifactUpElementAllRequest()
- {
- type = elementType
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 元素一键附魔(穿戴元素)
- /// </summary>
- /// <param name="elementType"></param>
- public void SendToWearElementByOnekey(int elementType)
- {
- var msg = new ArtifactUseElementAllRequest()
- {
- type = elementType
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 激活(解锁)元素
- /// </summary>
- /// <param name="elementId"></param>
- public void SendToUnlockElement(int elementId)
- {
- var msg = new ArtifactAddElementRequest()
- {
- elementId = elementId
- };
- NetModule.Request(msg);
- }
- #endregion
- /// <summary>
- /// 穿戴神器
- /// </summary>
- /// <param name="artifactId"></param>
- public void SendToWearArtifact(int artifactId)
- {
- var msg = new ArtifactShangzhenRequest()
- {
- artifactId = artifactId
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 穿戴神器
- /// </summary>
- public void SendToTakeOffArtifact()
- {
- NetModule.Request(new ArtifactDownRequest() { });
- }
- }
- }
|