Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: blahdot3h on July 18, 2013, 07:17:53 PM
-
I was taking a look through documentation and trying to figure out how to go about specifying which database you want to be searching with every itemID search. Any help getting pointed in the right direction to keep these inventory database's separate would be greatly appreciated. Thank you for the great work on NGUI, it has been a life saver.
For example I have two database's one with database id 0 other with database id 1 and I want the first item in the inventory from database id 1. How would I go about getting this without having it pull the item from database id 0 instead?
-
Problem solved, added a new static
static public InvBaseItem FindByID (int id32, int _db)
{
InvDatabase db = GetDatabase(_db);
return (db != null) ? db.GetItem(id32 & 0xFFFF) : null;
}
Allows you to specify the Db you want to search for when you search for an item.