mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-12 23:14:34 +01:00
- Implement FastClearEventStage handler for fast clearing event stages. - Enhance GetStoryDungeon handler to include team data and cleared stages. - Modify GetInventoryData to streamline item processing. - Introduce BuyEventPassRank and BuyPassRank handlers for purchasing event pass ranks. - Add CompleteEventPassMission and CompletePassMission handlers for mission completion. - Create ObtainEventPassReward and ObtainOneEventPassReward handlers for reward retrieval. - Implement ObtainPassReward and ObtainOnePassReward handlers for general pass rewards. - Add PassHelper class to manage pass-related logic, including obtaining rewards and completing missions. - Update User and EventData models to support new pass functionality. - Integrate log4net for improved logging capabilities throughout the application. - Update game configuration for static data and resource URLs. - Create log4net configuration file for logging setup.
50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
using EpinelPS.Utils;
|
|
using EpinelPS.Data;
|
|
namespace EpinelPS.LobbyServer.Inventory
|
|
{
|
|
[PacketPath("/inventory/get")]
|
|
public class GetInventoryData : LobbyMsgHandler
|
|
{
|
|
protected override async Task HandleAsync()
|
|
{
|
|
ReqGetInventoryData req = await ReadData<ReqGetInventoryData>();
|
|
User user = GetUser();
|
|
|
|
ResGetInventoryData response = new();
|
|
foreach (ItemData item in user.Items)
|
|
{
|
|
|
|
ItemSubType itemSubType = GameData.Instance.GetItemSubType(item.ItemType);
|
|
if (itemSubType == ItemSubType.HarmonyCube)
|
|
{
|
|
NetUserHarmonyCubeData harmonyCubeData = new NetUserHarmonyCubeData()
|
|
{
|
|
Tid = item.ItemType,
|
|
Lv = item.Level,
|
|
Isn = item.Isn
|
|
};
|
|
harmonyCubeData.CsnList.AddRange(item.CsnList);
|
|
response.HarmonyCubes.Add(harmonyCubeData);
|
|
}
|
|
response.Items.Add(new NetUserItemData() { Count = item.Count, Tid = item.ItemType, Csn = item.Csn, Lv = item.Level, Exp = item.Exp, Corporation = item.Corp, Isn = item.Isn, Position = item.Position });
|
|
|
|
}
|
|
|
|
|
|
// Add all equipment awakenings
|
|
foreach (EquipmentAwakeningData awakening in user.EquipmentAwakenings)
|
|
{
|
|
response.Awakenings.Add(new NetEquipmentAwakening()
|
|
{
|
|
Isn = awakening.Isn,
|
|
Option = awakening.Option
|
|
});
|
|
}
|
|
// TODO: UserRedeems
|
|
// Note: HarmonyCubes are now included in the Items list above
|
|
|
|
await WriteDataAsync(response);
|
|
}
|
|
}
|
|
}
|