mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-24 04:44:36 +01:00
- 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.
27 lines
703 B
C#
27 lines
703 B
C#
using EpinelPS.Database;
|
|
using EpinelPS.Utils;
|
|
|
|
namespace EpinelPS.LobbyServer.Soloraid;
|
|
|
|
[PacketPath("/soloraid/practice/setdamage")]
|
|
public class SetDamagePractice : LobbyMsgHandler
|
|
{
|
|
protected override async Task HandleAsync()
|
|
{
|
|
var req = await ReadData<ReqSetSoloRaidPracticeDamage>();
|
|
var user = GetUser();
|
|
ResSetSoloRaidPracticeDamage response = new();
|
|
|
|
try
|
|
{
|
|
SoloRaidHelper.SetDamagePractice(user, ref response, req);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Logging.WriteLine($"SetDamagePractice Error: {ex.Message}", LogType.Error);
|
|
}
|
|
|
|
JsonDb.Save();
|
|
await WriteDataAsync(response);
|
|
}
|
|
} |