private static void DrawSlots(SpriteBatch spriteBatch)
{
Player player = Main.player[Main.myPlayer];
int context = 0;
Item[] inv = (Item[])null;
if (player.chest > -1)
{
context = 3;
inv = Main.chest[player.chest].item;
}
if (player.chest == -2)
{
context = 4;
inv = player.bank.item;
}
if (player.chest == -3)
{
context = 4;
inv = player.bank2.item;
}
Main.inventoryScale = 0.755f;
if (Utils.FloatIntersect((float)Main.mouseX, (float)Main.mouseY, 0.0f, 0.0f, 73f, (float)Main.instance.invBottom, 560f * Main.inventoryScale, 224f * Main.inventoryScale))
player.mouseInterface = true;
for (int index1 = 0; index1 < 10; ++index1)
{
for (int index2 = 0; index2 < 4; ++index2)
{
int num1 = (int)(73.0 + (double)(index1 * 56) * (double)Main.inventoryScale);
int num2 = (int)((double)Main.instance.invBottom + (double)(index2 * 56) * (double)Main.inventoryScale);
int slot = index1 + index2 * 10;
Color color = new Color(100, 100, 100, 100);
if (Utils.FloatIntersect((float)Main.mouseX, (float)Main.mouseY, 0.0f, 0.0f, (float)num1, (float)num2, (float)Main.inventoryBackTexture.Width * Main.inventoryScale, (float)Main.inventoryBackTexture.Height * Main.inventoryScale))
{
player.mouseInterface = true;
ItemSlot.Handle(inv, context, slot);
}
ItemSlot.Draw(spriteBatch, inv, context, slot, new Vector2((float)num1, (float)num2), new Color());
}
}
}