Skip to content

Commit

Permalink
Fix method not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Citrinate committed Feb 18, 2024
1 parent bafaeb8 commit 26fbf8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CS2Interface/Data/InventoryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ private bool ParseAttributes(List<CSOEconItemAttribute>? attributes) {

switch (attribute_def["attribute_type"].Value) {
case "uint32":
Attributes.Add(attribute_name, new Attribute<uint>(attribute_name, BitConverter.ToUInt32(attribute.value_bytes)));
case null when attribute_def["stored_as_integer"].Value == "1":
Attributes.Add(attribute_name, new Attribute<uint>(attribute_name, BitConverter.ToUInt32(attribute.value_bytes.ToArray(), 0)));
break;

case "float":
Attributes.Add(attribute_name, new Attribute<float>(attribute_name, BitConverter.ToSingle(attribute.value_bytes)));
case null when attribute_def["stored_as_integer"].Value == "0":
Attributes.Add(attribute_name, new Attribute<float>(attribute_name, BitConverter.ToSingle(attribute.value_bytes.ToArray(), 0)));
break;

case "string":
Expand Down

0 comments on commit 26fbf8f

Please sign in to comment.