Files
EpinelPS/EpinelPS/LobbyServer/Soloraid/GetInfo.cs
qmengz da51e6ba3e feat: Implement soloraid - 实现单人突袭 (#71)
- Added new handlers for closing, entering, and opening solo raids and trials, including:
  - Close
  - ClosePractice
  - CloseTrial
  - Enter
  - EnterTrial
  - Open
  - OpenPractice
  - OpenTrial
- Introduced FastBattle handler for quick battle functionality.
- Implemented methods for getting level and badge data, including:
  - GetLevel
  - GetLevelPractice
  - GetLevelTrial
- Implemented methods for setting damage, including:
  - SetDamage
  - SetDamagePractice
  - SetDamageTrial
- Added logging and error handling for various operations.
- Created SoloRaidHelper class to manage solo raid logic, including opening, closing, and setting damage.
- Updated database models to include solo raid data structures.
- Enhanced user model to store solo raid information.
2025-12-15 21:33:49 -05:00

35 lines
932 B
C#

using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Soloraid;
[PacketPath("/soloraid/get")]
public class GetInfo : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
await ReadData<ReqGetSoloRaidInfo>();
User user = GetUser();
// ResGetSoloRaidInfo Fields
// NetUserSoloRaidInfo Info
// SoloRaidPeriodResult PeriodResult
// SoloRaidBanResult BanResult
ResGetSoloRaidInfo response = new()
{
Info = new NetUserSoloRaidInfo(),
PeriodResult = SoloRaidPeriodResult.Success,
BanResult = SoloRaidBanResult.Success
};
try
{
response.Info = SoloRaidHelper.GetUserSoloRaidInfo(user);
}
catch (Exception ex)
{
Logging.WriteLine($"GetSoloRaidInfo error: {ex.Message}", LogType.Error);
}
await WriteDataAsync(response);
}
}