Dropping items

When we drop items using spacebar we get hold of the InventoryItem class simply by calling it. And we use its method GetFromId. can we do this since its a static method?

Since GetFromID does not rely on any information from a class instance itself, only the information passed to it (and the resource lookup), it can be made static and we can call it from anywhere with just InventoryItem.GetFromID(string).

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms