Пример #1
0
        public MoneyMadeScreen(List <Object> shippingItems, int timeOfDay)
        {
            if (timeOfDay < 2000)
            {
                this.day = true;
            }
            int randomItemFromSeason = Utility.getRandomItemFromSeason(Game1.currentSeason, 0, false);
            int num1 = Game1.cropsOfTheWeek[(Game1.dayOfMonth - 1) / 7];

            foreach (Object shippingItem in shippingItems)
            {
                ShippedItem key  = new ShippedItem(shippingItem.ParentSheetIndex, shippingItem.Price, shippingItem.name);
                int         num2 = shippingItem.Price * shippingItem.Stack;
                if (shippingItem.ParentSheetIndex == randomItemFromSeason)
                {
                    num2 = (int)((double)num2 * 1.20000004768372);
                }
                if (shippingItem.ParentSheetIndex == num1)
                {
                    num2 = (int)((double)num2 * 1.10000002384186);
                }
                if (shippingItem.Name.Contains("="))
                {
                    num2 += num2 / 2;
                }
                int num3 = num2 - num2 % 5;
                if (this.shippingItems.ContainsKey(key))
                {
                    Dictionary <ShippedItem, int> shippingItems1 = this.shippingItems;
                    ShippedItem shippedItem = key;
                    ShippedItem index1      = shippedItem;
                    int         num4        = shippingItems1[index1];
                    ShippedItem index2      = shippedItem;
                    int         num5        = num4 + 1;
                    shippingItems1[index2] = num5;
                }
                else
                {
                    this.shippingItems.Add(key, shippingItem.Stack);
                }
                this.total = this.total + num3;
            }
        }
Пример #2
0
        public MoneyMadeScreen(List <Object> shippingItems, int timeOfDay)
        {
            if (timeOfDay < 2000)
            {
                this.day = true;
            }
            int randomItemFromSeason = Utility.getRandomItemFromSeason(Game1.currentSeason, 0, false);
            int num = Game1.cropsOfTheWeek[(Game1.dayOfMonth - 1) / 7];

            foreach (Object current in shippingItems)
            {
                ShippedItem shippedItem = new ShippedItem(current.ParentSheetIndex, current.Price, current.name);
                int         num2        = current.Price * current.Stack;
                if (current.ParentSheetIndex == randomItemFromSeason)
                {
                    num2 = (int)((float)num2 * 1.2f);
                }
                if (current.ParentSheetIndex == num)
                {
                    num2 = (int)((float)num2 * 1.1f);
                }
                if (current.Name.Contains("="))
                {
                    num2 += num2 / 2;
                }
                num2 -= num2 % 5;
                if (this.shippingItems.ContainsKey(shippedItem))
                {
                    Dictionary <ShippedItem, int> arg_EB_0 = this.shippingItems;
                    ShippedItem key  = shippedItem;
                    int         num3 = arg_EB_0[key];
                    arg_EB_0[key] = num3 + 1;
                }
                else
                {
                    this.shippingItems.Add(shippedItem, current.Stack);
                }
                this.total += num2;
            }
        }
        // Token: 0x0600029B RID: 667 RVA: 0x0003628C File Offset: 0x0003448C
        public MoneyMadeScreen(List <Object> shippingItems, int timeOfDay)
        {
            if (timeOfDay < 2000)
            {
                this.day = true;
            }
            int itemOfTheDay  = Utility.getRandomItemFromSeason(Game1.currentSeason, 0, false);
            int cropOfTheWeek = Game1.cropsOfTheWeek[(Game1.dayOfMonth - 1) / 7];

            foreach (Object o in shippingItems)
            {
                ShippedItem s     = new ShippedItem(o.ParentSheetIndex, o.Price, o.name);
                int         price = o.Price * o.Stack;
                if (o.ParentSheetIndex == itemOfTheDay)
                {
                    price = (int)((float)price * 1.2f);
                }
                if (o.ParentSheetIndex == cropOfTheWeek)
                {
                    price = (int)((float)price * 1.1f);
                }
                if (o.Name.Contains("="))
                {
                    price += price / 2;
                }
                price -= price % 5;
                if (this.shippingItems.ContainsKey(s))
                {
                    Dictionary <ShippedItem, int> arg_EB_0 = this.shippingItems;
                    ShippedItem key = s;
                    int         num = arg_EB_0[key];
                    arg_EB_0[key] = num + 1;
                }
                else
                {
                    this.shippingItems.Add(s, o.Stack);
                }
                this.total += price;
            }
        }
Пример #4
0
        public MoneyMadeScreen(List <Object> shippingItems, int timeOfDay)
        {
            if (timeOfDay < 2000)
            {
                day = true;
            }
            int itemOfTheDay  = Utility.getRandomItemFromSeason(Game1.currentSeason, 0, forQuest: false);
            int cropOfTheWeek = Game1.cropsOfTheWeek[(Game1.dayOfMonth - 1) / 7];

            foreach (Object o in shippingItems)
            {
                ShippedItem s      = new ShippedItem(o.ParentSheetIndex, o.Price, o.name);
                int         price2 = o.Price * o.Stack;
                if (o.ParentSheetIndex == itemOfTheDay)
                {
                    price2 = (int)((float)price2 * 1.2f);
                }
                if (o.ParentSheetIndex == cropOfTheWeek)
                {
                    price2 = (int)((float)price2 * 1.1f);
                }
                if (o.Name.Contains("="))
                {
                    price2 += price2 / 2;
                }
                price2 -= price2 % 5;
                if (this.shippingItems.ContainsKey(s))
                {
                    this.shippingItems[s]++;
                }
                else
                {
                    this.shippingItems.Add(s, o.Stack);
                }
                total += price2;
            }
        }