File tree Expand file tree Collapse file tree 4 files changed +13
-4
lines changed
common/Edelstein.Common.Gameplay/Entities/Inventories/Modifiers
protocol/Edelstein.Protocol.Gameplay/Entities/Inventories Expand file tree Collapse file tree 4 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 2
2
using System . Collections . Generic ;
3
3
using System . Collections . Immutable ;
4
4
using System . Linq ;
5
+ using Edelstein . Protocol . Gameplay . Constants ;
5
6
using Edelstein . Protocol . Gameplay . Entities . Inventories ;
6
7
using Edelstein . Protocol . Gameplay . Entities . Inventories . Modifiers ;
7
8
using Edelstein . Protocol . Gameplay . Entities . Inventories . Modifiers . Operations ;
Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using Edelstein . Protocol . Gameplay . Constants ;
2
3
using Edelstein . Protocol . Network . Packets . Types ;
3
4
4
5
namespace Edelstein . Protocol . Gameplay . Entities . Inventories ;
@@ -65,7 +66,8 @@ public static StructuredItemSlot ToStructured(this ItemSlotBase item)
65
66
66
67
Number = bundle . Number ,
67
68
Title = new LPString ( bundle . Title ?? "" ) ,
68
- Attribute = bundle . Attribute
69
+ Attribute = bundle . Attribute ,
70
+ SN = bundle . TemplateID . IsRechargeableItem ( ) ? 0 : null
69
71
} ,
70
72
ItemSlotPet pet => new StructuredItemSlotInfoPet
71
73
{
Original file line number Diff line number Diff line change 1
- namespace Edelstein . Protocol . Gameplay . Entities . Inventories ;
1
+ using Edelstein . Protocol . Gameplay . Constants ;
2
+
3
+ namespace Edelstein . Protocol . Gameplay . Entities . Inventories ;
2
4
3
5
public record ItemSlotBundle : ItemSlotBase
4
6
{
@@ -8,7 +10,8 @@ public record ItemSlotBundle : ItemSlotBase
8
10
public string ? Title { get ; set ; }
9
11
10
12
public bool IsMergeableWith ( ItemSlotBundle bundle )
11
- => TemplateID == bundle . TemplateID &&
13
+ => ! TemplateID . IsRechargeableItem ( ) &&
14
+ TemplateID == bundle . TemplateID &&
12
15
Attribute == bundle . Attribute &&
13
16
Title == bundle . Title &&
14
17
DateExpire == bundle . DateExpire ;
Original file line number Diff line number Diff line change 1
1
using BinarySerialization ;
2
+ using Edelstein . Protocol . Gameplay . Constants ;
2
3
using Edelstein . Protocol . Network . Packets . Types ;
3
4
4
5
namespace Edelstein . Protocol . Gameplay . Entities . Inventories ;
@@ -8,5 +9,7 @@ public record StructuredItemSlotInfoBundle : StructuredItemSlotInfoBase
8
9
[ FieldOrder ( 0 ) ] public short Number { get ; init ; }
9
10
[ FieldOrder ( 1 ) ] public LPString Title { get ; init ; } = new ( ) ;
10
11
[ FieldOrder ( 2 ) ] public short Attribute { get ; init ; }
11
- [ FieldOrder ( 3 ) ] public long ? SN { get ; init ; }
12
+
13
+ [ FieldOrder ( 3 ) ]
14
+ public long ? SN { get ; init ; }
12
15
}
You can’t perform that action at this time.
0 commit comments