CTFPlayer::ReapplyItemUpgrades takes in a CTFPlayer and a CEconItemView as parameters.
From an item entity index returned by TF2Items_GiveNamedItem, is there a way to get the CEconItemView of that item to pass into that function?
Some people told me that's only accessible from an extension only, but I noticed
here that psychonic managed to be able to send in a CEconItemView to CTFDroppedWeapon::Create.
CTFPlayer::ReapplyItemUpgrades is called in MvM to apply upgrades purchased from the upgrades station to the players' weapons. I want to call this after an item from TF2Items is generated since GiveNamedItem doesn't call CTFPlayer::ReapplyItemUpgrades (and therefore, when a player respawns, the upgrades don't *always* appear on the item given by TF2Items).
So something like this would occur in the plugin:
PHP Code:
int ItemEntity = TF2Items_GiveNamedItem(client, hItem);
CloseHandle(hItem);
SDKCall(ReapplyItemUpgrades, client, ????);
The ???? is the CEconItemView. What do I put in there? Also, how do I prep the sdkcall for this function? (I have the gamedata already.) Any insight or advice would be helpful. Thanks!