diff --git a/NebulaModel/Packets/Players/PlayerTechBonuses.cs b/NebulaModel/Packets/Players/PlayerTechBonuses.cs index 56c7dbb8a..1a165f073 100644 --- a/NebulaModel/Packets/Players/PlayerTechBonuses.cs +++ b/NebulaModel/Packets/Players/PlayerTechBonuses.cs @@ -29,6 +29,7 @@ public class PlayerTechBonuses : INetSerializable int droneCount { get; set; } float droneSpeed { get; set; } int droneMovement { get; set; } + int inventorySize { get; set; } public PlayerTechBonuses() { } @@ -59,6 +60,7 @@ public PlayerTechBonuses(Mecha source) this.droneCount = source.droneCount; this.droneSpeed = source.droneSpeed; this.droneMovement = source.droneMovement; + this.inventorySize = source.player.package.size; } public void UpdateMech(Mecha destination) @@ -88,6 +90,10 @@ public void UpdateMech(Mecha destination) destination.droneCount = this.droneCount; destination.droneSpeed = this.droneSpeed; destination.droneMovement = this.droneMovement; + if (this.inventorySize > destination.player.package.size) + { + destination.player.package.SetSize(this.inventorySize); + } } public void Serialize(NetDataWriter writer) @@ -117,6 +123,7 @@ public void Serialize(NetDataWriter writer) writer.Put(droneCount); writer.Put(droneSpeed); writer.Put(droneMovement); + writer.Put(inventorySize); } public void Deserialize(NetDataReader reader) @@ -146,6 +153,7 @@ public void Deserialize(NetDataReader reader) droneCount = reader.GetInt(); droneSpeed = reader.GetFloat(); droneMovement = reader.GetInt(); + inventorySize = reader.GetInt(); } } }