View Single Post
psychonic

BAFFLED
Join Date: May 2008
Old 02-16-2016 , 11:19   Re: [TF2] Getting CEconItemView
Reply With Quote #4

Quote:
Originally Posted by Potato Uno View Post
Does that work if the item is a wearable like demoknight shields or do I need to find a different item offset? (If so, what do I find?)
I believe so, but you'll likely need to change the net class being used for the lookup since the shield isn't a base TF weapon and has a different inheritance tree.

Replace "CTFWeaponBase" with whatever you get from GetEntityNetClass should work.

Edit: As a safety, you should probably also check that the returned offset isn't -1 (not found).

Last edited by psychonic; 02-16-2016 at 11:20.
psychonic is offline