mirror of
https://github.com/sebastian-heinz/Arrowgene.DragonsDogmaOnline
synced 2026-08-03 11:12:41 -04:00
- Adjust nameplates for final abyss boss. - Fixed issue where crest is regenerated when performing embody action.
35 lines
1.4 KiB
C#
35 lines
1.4 KiB
C#
using Arrowgene.Ddon.GameServer.Characters;
|
|
using Arrowgene.Ddon.Server;
|
|
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
|
|
using Arrowgene.Ddon.Shared.Entity.Structure;
|
|
using Arrowgene.Logging;
|
|
|
|
namespace Arrowgene.Ddon.GameServer.Handler
|
|
{
|
|
public class ItemGetDefaultStorageEmptySlotNumHandler : GameRequestPacketHandler<C2SItemGetDefaultStorageEmptySlotNumReq, S2CItemGetDefaultStorageEmptySlotNumRes>
|
|
{
|
|
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(ItemGetDefaultStorageEmptySlotNumHandler));
|
|
|
|
public ItemGetDefaultStorageEmptySlotNumHandler(DdonGameServer server) : base(server)
|
|
{
|
|
}
|
|
|
|
public override S2CItemGetDefaultStorageEmptySlotNumRes Handle(GameClient client, C2SItemGetDefaultStorageEmptySlotNumReq request)
|
|
{
|
|
var result = new S2CItemGetDefaultStorageEmptySlotNumRes();
|
|
|
|
var characterStorage = Server.Database.SelectAllStoragesByCharacterId(client.Character.CharacterId);
|
|
foreach (var storageType in ItemManager.BbmEmbodyStorages)
|
|
{
|
|
var storage = characterStorage.GetStorage(storageType);
|
|
result.EmptySlotNumList.Add(new CDataStorageEmptySlotNum()
|
|
{
|
|
StorageType = storageType,
|
|
Slots = storage.EmptySlots()
|
|
});
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|
|
}
|