protected static void DeserializeSharedProperties(uLink.BitStream stream, InventoryItem item, ItemDataBlock db) { item.uses = stream.ReadInvInt(); if (item.datablock.DoesLoseCondition()) { item.condition = stream.ReadSingle(); item.maxcondition = stream.ReadSingle(); } }
protected override void OnBitStreamRead(uLink.BitStream stream) { base.OnBitStreamRead(stream); this.SetTotalModSlotCount(stream.ReadInvInt()); this.SetUsedModSlotCount(stream.ReadInvInt()); int usedModSlots = this.usedModSlots; for (int i = 0; i < 5; i++) { if (i < usedModSlots) { this._itemMods[i] = DatablockDictionary.GetByUniqueID(stream.ReadInt32()) as ItemModDataBlock; } else { this._itemMods[i] = null; } } }