예제 #1
0
        // Token: 0x06003066 RID: 12390 RVA: 0x0013E85C File Offset: 0x0013CC5C
        public void commitModifiedDynamicProps()
        {
            if (this.modifiedItems.Count < 1)
            {
                return;
            }
            SteamInventoryUpdateHandle_t handle = SteamInventory.StartUpdateProperties();

            foreach (ushort itemID in this.modifiedItems)
            {
                ulong value;
                if (Characters.getPackageForItemID(itemID, out value))
                {
                    EStatTrackerType type;
                    int num;
                    if (this.getStatTrackerValue(itemID, out type, out num))
                    {
                        string statTrackerPropertyName = Provider.provider.economyService.getStatTrackerPropertyName(type);
                        if (!string.IsNullOrEmpty(statTrackerPropertyName))
                        {
                            SteamInventory.SetProperty(handle, new SteamItemInstanceID_t(value), statTrackerPropertyName, (long)num);
                        }
                    }
                }
            }
            SteamInventory.SubmitUpdateProperties(handle, out Provider.provider.economyService.commitResult);
        }
예제 #2
0
        // Token: 0x06002A13 RID: 10771 RVA: 0x001050E4 File Offset: 0x001034E4
        private static bool getSlot1StatTrackerValue(out EStatTrackerType type, out int kills)
        {
            type  = EStatTrackerType.NONE;
            kills = -1;
            ulong instance;

            return(Characters.getPackageForItemID(Characters.active.secondaryItem, out instance) && Provider.provider.economyService.getInventoryStatTrackerValue(instance, out type, out kills));
        }