示例#1
0
        public static void DrawSavings(SpriteBatch sb, int currencyIndex, float shopx, float shopy, bool horizontal = false)
        {
            CustomCurrencySystem currency = CustomCurrencyManager._currencies[currencyIndex];
            Player player = Main.player[Main.myPlayer];
            bool   overFlowing;
            long   num1       = currency.CountCurrency(out overFlowing, player.bank.item);
            long   num2       = currency.CountCurrency(out overFlowing, player.bank2.item);
            long   num3       = currency.CountCurrency(out overFlowing, player.bank3.item);
            long   totalCoins = currency.CombineStacks(out overFlowing, num1, num2, num3);

            if (totalCoins <= 0L)
            {
                return;
            }
            if (num3 > 0L)
            {
                sb.Draw(Main.itemTexture[3813], Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), Vector2.op_Multiply(Main.itemTexture[3813].Size(), 0.65f)), new Rectangle?(), Color.get_White());
            }
            if (num2 > 0L)
            {
                sb.Draw(Main.itemTexture[346], Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), Vector2.op_Multiply(Main.itemTexture[346].Size(), 0.65f)), new Rectangle?(), Color.get_White());
            }
            if (num1 > 0L)
            {
                sb.Draw(Main.itemTexture[87], Utils.CenteredRectangle(new Vector2(shopx + 70f, shopy + 60f), Vector2.op_Multiply(Main.itemTexture[87].Size(), 0.65f)), new Rectangle?(), Color.get_White());
            }
            Utils.DrawBorderStringFourWay(sb, Main.fontMouseText, Lang.inter[66].Value, shopx, shopy + 40f, Color.op_Multiply(Color.get_White(), (float)Main.mouseTextColor / (float)byte.MaxValue), Color.get_Black(), Vector2.get_Zero(), 1f);
            currency.DrawSavingsMoney(sb, Lang.inter[66].Value, shopx, shopy, totalCoins, horizontal);
        }
示例#2
0
        // Token: 0x0600103E RID: 4158 RVA: 0x003FEA4C File Offset: 0x003FCC4C
        public static void DrawSavings(SpriteBatch sb, int currencyIndex, float shopx, float shopy, bool horizontal = false)
        {
            CustomCurrencySystem customCurrencySystem = CustomCurrencyManager._currencies[currencyIndex];
            Player player = Main.player[Main.myPlayer];
            bool   flag;
            long   num  = customCurrencySystem.CountCurrency(out flag, player.bank.item, new int[0]);
            long   num2 = customCurrencySystem.CountCurrency(out flag, player.bank2.item, new int[0]);
            long   num3 = customCurrencySystem.CountCurrency(out flag, player.bank3.item, new int[0]);
            long   num4 = customCurrencySystem.CombineStacks(out flag, new long[]
            {
                num,
                num2,
                num3
            });

            if (num4 > 0L)
            {
                if (num3 > 0L)
                {
                    sb.Draw(Main.itemTexture[3813], Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), Main.itemTexture[3813].Size() * 0.65f), null, Color.White);
                }
                if (num2 > 0L)
                {
                    sb.Draw(Main.itemTexture[346], Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), Main.itemTexture[346].Size() * 0.65f), null, Color.White);
                }
                if (num > 0L)
                {
                    sb.Draw(Main.itemTexture[87], Utils.CenteredRectangle(new Vector2(shopx + 70f, shopy + 60f), Main.itemTexture[87].Size() * 0.65f), null, Color.White);
                }
                Utils.DrawBorderStringFourWay(sb, Main.fontMouseText, Lang.inter[66].Value, shopx, shopy + 40f, Color.White * ((float)Main.mouseTextColor / 255f), Color.Black, Vector2.Zero, 1f);
                customCurrencySystem.DrawSavingsMoney(sb, Lang.inter[66].Value, shopx, shopy, num4, horizontal);
            }
        }
示例#3
0
        public static void DrawSavings(
            SpriteBatch sb,
            int currencyIndex,
            float shopx,
            float shopy,
            bool horizontal = false)
        {
            CustomCurrencySystem currency = CustomCurrencyManager._currencies[currencyIndex];
            Player player = Main.player[Main.myPlayer];
            bool   overFlowing;
            long   num1       = currency.CountCurrency(out overFlowing, player.bank.item);
            long   num2       = currency.CountCurrency(out overFlowing, player.bank2.item);
            long   num3       = currency.CountCurrency(out overFlowing, player.bank3.item);
            long   num4       = currency.CountCurrency(out overFlowing, player.bank4.item);
            long   totalCoins = currency.CombineStacks(out overFlowing, num1, num2, num3, num4);

            if (totalCoins <= 0L)
            {
                return;
            }
            Main.instance.LoadItem(4076);
            Main.instance.LoadItem(3813);
            Main.instance.LoadItem(346);
            Main.instance.LoadItem(87);
            if (num4 > 0L)
            {
                sb.Draw(TextureAssets.Item[4076].get_Value(), Utils.CenteredRectangle(new Vector2(shopx + 96f, shopy + 50f), TextureAssets.Item[4076].get_Value().Size() * 0.65f), new Rectangle?(), Color.White);
            }
            if (num3 > 0L)
            {
                sb.Draw(TextureAssets.Item[3813].get_Value(), Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), TextureAssets.Item[3813].get_Value().Size() * 0.65f), new Rectangle?(), Color.White);
            }
            if (num2 > 0L)
            {
                sb.Draw(TextureAssets.Item[346].get_Value(), Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), TextureAssets.Item[346].get_Value().Size() * 0.65f), new Rectangle?(), Color.White);
            }
            if (num1 > 0L)
            {
                sb.Draw(TextureAssets.Item[87].get_Value(), Utils.CenteredRectangle(new Vector2(shopx + 70f, shopy + 60f), TextureAssets.Item[87].get_Value().Size() * 0.65f), new Rectangle?(), Color.White);
            }
            Utils.DrawBorderStringFourWay(sb, FontAssets.MouseText.get_Value(), Lang.inter[66].Value, shopx, shopy + 40f, Color.White * ((float)Main.mouseTextColor / (float)byte.MaxValue), Color.Black, Vector2.Zero, 1f);
            currency.DrawSavingsMoney(sb, Lang.inter[66].Value, shopx, shopy, totalCoins, horizontal);
        }
        public static void DrawSavings(SpriteBatch sb, int currencyIndex, float shopx, float shopy, bool horizontal = false)
        {
            CustomCurrencySystem customCurrencySystem = _currencies[currencyIndex];
            Player player = Main.player[Main.myPlayer];
            bool   overFlowing;
            long   num  = customCurrencySystem.CountCurrency(out overFlowing, player.bank.item);
            long   num2 = customCurrencySystem.CountCurrency(out overFlowing, player.bank2.item);
            long   num3 = customCurrencySystem.CountCurrency(out overFlowing, player.bank3.item);
            long   num4 = customCurrencySystem.CountCurrency(out overFlowing, player.bank4.item);
            long   num5 = customCurrencySystem.CombineStacks(out overFlowing, num, num2, num3, num4);

            if (num5 > 0)
            {
                Main.instance.LoadItem(4076);
                Main.instance.LoadItem(3813);
                Main.instance.LoadItem(346);
                Main.instance.LoadItem(87);
                if (num4 > 0)
                {
                    sb.Draw(TextureAssets.Item[4076].Value, Utils.CenteredRectangle(new Vector2(shopx + 96f, shopy + 50f), TextureAssets.Item[4076].Value.Size() * 0.65f), null, Color.White);
                }
                if (num3 > 0)
                {
                    sb.Draw(TextureAssets.Item[3813].Value, Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), TextureAssets.Item[3813].Value.Size() * 0.65f), null, Color.White);
                }
                if (num2 > 0)
                {
                    sb.Draw(TextureAssets.Item[346].Value, Utils.CenteredRectangle(new Vector2(shopx + 80f, shopy + 50f), TextureAssets.Item[346].Value.Size() * 0.65f), null, Color.White);
                }
                if (num > 0)
                {
                    sb.Draw(TextureAssets.Item[87].Value, Utils.CenteredRectangle(new Vector2(shopx + 70f, shopy + 60f), TextureAssets.Item[87].Value.Size() * 0.65f), null, Color.White);
                }
                Utils.DrawBorderStringFourWay(sb, FontAssets.MouseText.Value, Lang.inter[66].Value, shopx, shopy + 40f, Color.White * ((float)(int)Main.mouseTextColor / 255f), Color.Black, Vector2.Zero);
                customCurrencySystem.DrawSavingsMoney(sb, Lang.inter[66].Value, shopx, shopy, num5, horizontal);
            }
        }