- Timestamp:
- Jul 31, 2023, 4:06:13 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/PersistentData/Inventory.cs
r351 r455 24 24 } 25 25 26 private void ProcessInv ( List<InvItem> _target, ItemStack[]_sourceFields, int _id) {26 private void ProcessInv (ICollection<InvItem> _target, IReadOnlyList<ItemStack> _sourceFields, int _id) { 27 27 _target.Clear (); 28 for (int i = 0; i < _sourceFields. Length; i++) {28 for (int i = 0; i < _sourceFields.Count; i++) { 29 29 InvItem item = CreateInvItem (_sourceFields [i].itemValue, _sourceFields [i].count, _id); 30 30 if (item != null && _sourceFields [i].itemValue.Modifications != null) { … … 43 43 } 44 44 45 private void ProcessParts (I temValue[]_parts, InvItem _item, int _playerId) {46 InvItem[] itemParts = new InvItem[_parts. Length];47 for (int i = 0; i < _parts. Length; i++) {45 private void ProcessParts (IReadOnlyList<ItemValue> _parts, InvItem _item, int _playerId) { 46 InvItem[] itemParts = new InvItem[_parts.Count]; 47 for (int i = 0; i < _parts.Count; i++) { 48 48 InvItem partItem = CreateInvItem (_parts [i], 1, _playerId); 49 49 if (partItem != null && _parts [i].Modifications != null) { … … 67 67 68 68 if (_count > maxAllowed) { 69 Log.Out ("Player with ID " + _playerId + " has stack for \"" + name + "\" greater than allowed (" + 70 _count + " > " + maxAllowed + ")"); 69 Log.Out ($"Player with ID {_playerId} has stack for \"{name}\" greater than allowed ({_count} > {maxAllowed})"); 71 70 } 72 71
Note:
See TracChangeset
for help on using the changeset viewer.