Currently, I'm doing this (grr it got chopped but you get the idea - I have the resref of the item(s) I'm looking for):
foreach (NWN2ItemBlueprint blueprint in NWN2Toolset.NWN2.Data.Blueprints.NWN2GlobalBlueprintManager.GetBlueprintsOfType(NWN2Toolset.NWN2.Data.Templates.NWN2ObjectType.Item)){ // Now just look at each Item Blueprint till I find a resref I'm looking for break out of the loop.
}
This is a pain in the butt not to mention terribly slow if I have a lot of items and have to do this many times. I did find this method:
NWN2Toolset.NWN2.Data.Blueprints.NWN2GlobalBlueprintManager.FindBlueprint(NWN2Toolset.NWN2.Data.Templates.NWN2ObjectType.Item, new OEIResRef(sResRef));
But that returns the more general INWN2Blueprint and not just an item blueprint. Anyone know how to use a Find function like this and get back the actual Item blueprint with all the properties?
Thanks!
Modifié par Marshall V, 13 août 2011 - 12:12 .





Retour en haut






