Example #1
0
        public invItem(List <int> terrData, itemHandler handler)
        {
            int id = handler.resolveEncodedData(terrData[0], terrData[1]);

            item     = handler.searchItemByID(id);
            quantity = handler.resolveEncodedData(terrData[4], terrData[5]);
            prefix   = handler.searchPrefixByID(terrData[8]);
        }
Example #2
0
        public invItem(List <int> terrData, itemHandler handler)
        {
            int id = handler.resolveEncodedData(terrData[0], terrData[1]);

            quantity   = handler.resolveEncodedData(terrData[4], terrData[5]);
            prefix     = handler.searchPrefixByID(terrData[8]);
            isFavorite = terrData.Last() == 1 ? true : false;

            if (quantity > 0 && id == 0)
            {
                item = handler.searchItemByID(-1);
            }
            else
            {
                item = handler.searchItemByID(id);
            }

            //Console.WriteLine(item.name + ":" + isFavorite);
        }