45
« on: October 25, 2013, 07:35:57 AM »
Sorry for the delay Slyone.
Stealth keeps a cache of items in memory.
The Findxxxx() functions are simple search heuristics for this cache of items.
In this context, items have 3 properties we care about
Item.ID = Unique ID
Item.Color = Item's Color Hue
Item.Container = Item's parent container (0x0000 = ground, all non-zero are containers in the game)
My FindItem() wrapper functions might start becoming self explanatory now.
public static Item FindItem(ushort Type, uint Container = 0x00000000, bool Recursive = false, ushort Color = 0xFFFF)
In plain english "Search for an item of Type, inside of Container, `should i search inside other bags?`, that is of hue Color"
public static List<Item> FindItems(ushort Type, uint Container = 0x00000000, bool Recursive = false, ushort Color = 0xFFFF)
In plain english "Search for ALL items of Type, inside of Container, `should i search inside other bags?`, that is of hue Color"
public static List<Item> FindItems(ushort[] Types, uint[] Containers, ushort[] Colors, bool Recursive = false)
In plain english "Search for ALL items that are of any type inside Types, that are in any of the containers inside Containers, of any hue inside Colors, and should we search within all bags for these Types?"
Please be aware ... These functions don't actually send anything to the UO servers. These are just search mechanisms for the cache of items that Stealth has stored.
If you have any other questions, feel free to ask.
-Orich