Aller au contenu

Photo

GetItemsInInventory: placeables & basetype filter bug


  • Veuillez vous connecter pour répondre
Aucune réponse à ce sujet

#1
Phaenan

Phaenan
  • Members
  • 315 messages
Hop.

Since I just lost twenty minutes running in circles thanks to that thingy, I though I might as well give you folks the heads up.
Basically GetItemsInInventory() is a function returning the contents of an object's inventory, with optional filters applied to the set of results. One of those filters involves the items basetype. And here's the catch : while it does work on creatures, it apparently does not work on placeables inventories. My guess is that's something to do with containers inventories being unsorted (contrarily to the player's for instance) but I'm just grasping at straws here. Anyhoo, the reason why doesn't matter much from a modder point of view.

That's not a crucial issue, but just imagine you're only interested in the gems found in a placeable, you'll still end up with the full contents if you're using the GetItemsInInventory() basetype filter... And it may take a while before you run out of options and start blaming it on the nice built-in function... <_<

Modifié par Phaenan, 01 août 2010 - 10:46 .