mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-03 04:36:03 +08:00
Feature:Asynchronous Operation & Formatting Code
- Now the async operation is enabled! - Code formatted by Resharper plugin <3
This commit is contained in:
@@ -1,33 +1,27 @@
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial;
|
||||
|
||||
public class PacketFinishTutorialGuideScRsp : BasePacket
|
||||
{
|
||||
public class PacketFinishTutorialGuideScRsp : BasePacket
|
||||
public PacketFinishTutorialGuideScRsp(uint tutorialId) : base(CmdIds.FinishTutorialGuideScRsp)
|
||||
{
|
||||
public PacketFinishTutorialGuideScRsp(uint tutorialId) : base(CmdIds.FinishTutorialGuideScRsp)
|
||||
var rsp = new FinishTutorialGuideScRsp
|
||||
{
|
||||
var rsp = new FinishTutorialGuideScRsp
|
||||
TutorialGuide = new TutorialGuide
|
||||
{
|
||||
TutorialGuide = new ()
|
||||
{
|
||||
Id = tutorialId,
|
||||
Status = TutorialStatus.TutorialFinish,
|
||||
},
|
||||
Reward = new (),
|
||||
};
|
||||
Id = tutorialId,
|
||||
Status = TutorialStatus.TutorialFinish
|
||||
},
|
||||
Reward = new ItemList()
|
||||
};
|
||||
|
||||
rsp.Reward.ItemList_.Add(new Item
|
||||
{
|
||||
ItemId = 1,
|
||||
Num = 1,
|
||||
});
|
||||
rsp.Reward.ItemList_.Add(new Item
|
||||
{
|
||||
ItemId = 1,
|
||||
Num = 1
|
||||
});
|
||||
|
||||
SetData(rsp);
|
||||
}
|
||||
SetData(rsp);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,20 @@
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial;
|
||||
|
||||
public class PacketFinishTutorialScRsp : BasePacket
|
||||
{
|
||||
public class PacketFinishTutorialScRsp : BasePacket
|
||||
public PacketFinishTutorialScRsp(uint tutorialId) : base(CmdIds.FinishTutorialScRsp)
|
||||
{
|
||||
public PacketFinishTutorialScRsp(uint tutorialId) : base(CmdIds.FinishTutorialScRsp)
|
||||
var rsp = new FinishTutorialScRsp
|
||||
{
|
||||
var rsp = new FinishTutorialScRsp
|
||||
Tutorial = new Proto.Tutorial
|
||||
{
|
||||
Tutorial = new Proto.Tutorial
|
||||
{
|
||||
Id = tutorialId,
|
||||
Status = TutorialStatus.TutorialFinish,
|
||||
},
|
||||
};
|
||||
Id = tutorialId,
|
||||
Status = TutorialStatus.TutorialFinish
|
||||
}
|
||||
};
|
||||
|
||||
SetData(rsp);
|
||||
}
|
||||
SetData(rsp);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,20 @@
|
||||
using EggLink.DanhengServer.Game.Player;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial
|
||||
{
|
||||
public class PacketGetTutorialGuideScRsp : BasePacket
|
||||
{
|
||||
public PacketGetTutorialGuideScRsp(PlayerInstance player) : base(CmdIds.GetTutorialGuideScRsp)
|
||||
{
|
||||
var proto = new GetTutorialGuideScRsp { TutorialGuideList = { } };
|
||||
foreach (var data in player.TutorialGuideData?.Tutorials ?? [])
|
||||
{
|
||||
proto.TutorialGuideList.Add(new TutorialGuide()
|
||||
{
|
||||
Id = (uint)data.Key,
|
||||
Status = data.Value,
|
||||
});
|
||||
}
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial;
|
||||
|
||||
SetData(proto);
|
||||
}
|
||||
public class PacketGetTutorialGuideScRsp : BasePacket
|
||||
{
|
||||
public PacketGetTutorialGuideScRsp(PlayerInstance player) : base(CmdIds.GetTutorialGuideScRsp)
|
||||
{
|
||||
var proto = new GetTutorialGuideScRsp();
|
||||
foreach (var data in player.TutorialGuideData?.Tutorials ?? [])
|
||||
proto.TutorialGuideList.Add(new TutorialGuide
|
||||
{
|
||||
Id = (uint)data.Key,
|
||||
Status = data.Value
|
||||
});
|
||||
|
||||
SetData(proto);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,20 @@
|
||||
using EggLink.DanhengServer.Game.Player;
|
||||
using EggLink.DanhengServer.Proto;
|
||||
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial
|
||||
{
|
||||
public class PacketGetTutorialScRsp : BasePacket
|
||||
{
|
||||
public PacketGetTutorialScRsp(PlayerInstance player) : base(CmdIds.GetTutorialScRsp)
|
||||
{
|
||||
var proto = new GetTutorialScRsp() { TutorialList = { } };
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial;
|
||||
|
||||
foreach (var item in player.TutorialData!.Tutorials)
|
||||
public class PacketGetTutorialScRsp : BasePacket
|
||||
{
|
||||
public PacketGetTutorialScRsp(PlayerInstance player) : base(CmdIds.GetTutorialScRsp)
|
||||
{
|
||||
var proto = new GetTutorialScRsp();
|
||||
|
||||
foreach (var item in player.TutorialData!.Tutorials)
|
||||
proto.TutorialList.Add(new Proto.Tutorial
|
||||
{
|
||||
proto.TutorialList.Add(new Proto.Tutorial()
|
||||
{
|
||||
Id = (uint)item.Key,
|
||||
Status = item.Value,
|
||||
});
|
||||
}
|
||||
SetData(proto);
|
||||
}
|
||||
Id = (uint)item.Key,
|
||||
Status = item.Value
|
||||
});
|
||||
SetData(proto);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,19 @@
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial;
|
||||
|
||||
public class PacketUnlockTutorialGuideScRsp : BasePacket
|
||||
{
|
||||
public class PacketUnlockTutorialGuideScRsp : BasePacket
|
||||
public PacketUnlockTutorialGuideScRsp(uint tutorialId) : base(CmdIds.UnlockTutorialGuideScRsp)
|
||||
{
|
||||
public PacketUnlockTutorialGuideScRsp(uint tutorialId) : base(CmdIds.UnlockTutorialGuideScRsp)
|
||||
var proto = new UnlockTutorialGuideScRsp
|
||||
{
|
||||
var proto = new UnlockTutorialGuideScRsp
|
||||
TutorialGuide = new TutorialGuide
|
||||
{
|
||||
TutorialGuide = new()
|
||||
{
|
||||
Id = tutorialId,
|
||||
Status = TutorialStatus.TutorialUnlock,
|
||||
}
|
||||
};
|
||||
SetData(proto);
|
||||
}
|
||||
Id = tutorialId,
|
||||
Status = TutorialStatus.TutorialUnlock
|
||||
}
|
||||
};
|
||||
SetData(proto);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,19 @@
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial
|
||||
namespace EggLink.DanhengServer.Server.Packet.Send.Tutorial;
|
||||
|
||||
public class PacketUnlockTutorialScRsp : BasePacket
|
||||
{
|
||||
public class PacketUnlockTutorialScRsp : BasePacket
|
||||
public PacketUnlockTutorialScRsp(uint tutorialId) : base(CmdIds.UnlockTutorialScRsp)
|
||||
{
|
||||
public PacketUnlockTutorialScRsp(uint tutorialId) : base(CmdIds.UnlockTutorialScRsp)
|
||||
var proto = new UnlockTutorialScRsp
|
||||
{
|
||||
var proto = new UnlockTutorialScRsp
|
||||
Tutorial = new Proto.Tutorial
|
||||
{
|
||||
Tutorial = new()
|
||||
{
|
||||
Id = tutorialId,
|
||||
Status = TutorialStatus.TutorialUnlock,
|
||||
}
|
||||
};
|
||||
SetData(proto);
|
||||
}
|
||||
Id = tutorialId,
|
||||
Status = TutorialStatus.TutorialUnlock
|
||||
}
|
||||
};
|
||||
SetData(proto);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user