123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- using FL.Data.Items;
- using FL.Network;
- using System;
- using XGame;
- using XGame.Framework.Data;
- using XGame.Framework.Network;
- namespace FL.Data
- {
- public class DragonEggService : DataSingleton<DragonEggService>, IDisposable
- {
- /// <summary>
- /// 请求(龙蛋)宝藏信息
- /// </summary>
- public void SendToTreasureInfo()
- {
- IMsgRequest msg = new LongdanIntoRequest()
- {
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 请求开启龙蛋宝藏
- /// </summary>
- public void SendToOpenDragonTreasure(int itemId, int count)
- {
- // 向服务器发送开启龙蛋宝藏消息
- IMsgRequest msg = new LongdanOpenRequest()
- {
- itemid = itemId,
- count = count
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 领取宝箱进度奖励
- /// </summary>
- public void SendToOpenTreasureBoxAward()
- {
- NetModule.Request(new LongdanRwdBoxRequest(){ });
- }
- /// <summary>
- /// 请求龙蛋升级
- /// </summary>
- public void SendToUpgrade()
- {
- NetModule.Request(new LongdanUpLevelRequest() { });
- }
- /// <summary>
- /// 请求加速宝箱升级
- /// </summary>
- /// <param name="type">1_加速 2_广告</param>
- /// <param name="useNum">使用数量type=1有效</param>
- public void SendToAcceleration(int type, int useNum)
- {
- Log.Info("请求加速宝箱升级");
- var msg = new LongdanSubcdRequest()
- {
- type = type,
- count = useNum
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 请求替换装备
- /// </summary>
- /// <param name="equipType"></param>
- /// <param name="equipData"></param>
- public void OnChangeEquip(long id)
- {
- var msg = new EquipTihuanRequest()
- {
- xhid = (int)id
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 出售指定的装备
- /// </summary>
- /// <param name="equipData"></param>
- public void SellEquip(int[] sellIds)
- {
- var msg = new EquipDelEquipRequest()
- {
- xhids = sellIds
- };
- NetModule.Request(msg);
- }
- /// <summary>
- /// 一键出售装备背包中的所有装备
- /// </summary>
- public void SendToSellAllBagEquips()
- {
- NetModule.Request(new EquipDelEquipLsRequest() { });
- }
- /// <summary>
- /// 请求装备临时背包数据
- /// </summary>
- public void SendToOpenTemporaryEquipBag()
- {
- NetModule.Request(new EquipIntoLsRequest() { });
- }
- void IDisposable.Dispose()
- {
- }
- }
- }
|