示例#1
0
        private Schema.Item GetItemFromPrivateBp(TradeEvent tradeEvent, ulong itemID)
        {
            if (OtherPrivateInventory == null)
            {
                // get the foreign inventory
                var f = session.GetForiegnInventory(OtherSID, tradeEvent.contextid, tradeEvent.appid);
                OtherPrivateInventory = new ForeignInventory(f);
            }

            ushort defindex = OtherPrivateInventory.GetDefIndex(itemID);

            Schema.Item schemaItem = CurrentSchema.GetItem(defindex);
            return(schemaItem);
        }
示例#2
0
        private Schema.Item GetItemFromPrivateBp(TradeUserAssets asset)
        {
            if (OtherPrivateInventory == null)
            {
                dynamic foreignInventory = session.GetForeignInventory(OtherSID, asset.contextid, asset.appid);
                if (foreignInventory == null || foreignInventory.success == null || !foreignInventory.success.Value)
                {
                    return(null);
                }

                OtherPrivateInventory = new ForeignInventory(foreignInventory);
            }

            int defindex = OtherPrivateInventory.GetDefIndex(asset.assetid);

            Schema.Item schemaItem = CurrentSchema.GetItem(defindex);
            return(schemaItem);
        }
示例#3
0
        private Schema.Item GetItemFromPrivateBp(TradeEvent tradeEvent, ulong itemID)
        {
            if (OtherPrivateInventory == null)
            {
                // get the foreign inventory
                var f = session.GetForiegnInventory(OtherSID, tradeEvent.contextid,tradeEvent.contextid);
                OtherPrivateInventory = new ForeignInventory(f);
            }

            ushort defindex = OtherPrivateInventory.GetDefIndex(itemID);

            Schema.Item schemaItem = CurrentSchema.GetItem(defindex);
            return schemaItem;
        }