public GetImmuneAlphaPure ( Color newColor, float alphaReduction ) : Color | ||
newColor | Color | |
alphaReduction | float | |
return | Color |
protected void DrawPlayer(Player drawPlayer, Vector2 Position, float rotation, Vector2 rotationOrigin, float shadow = 0f) { int num = -1; Main.playerDrawData.Clear(); Main.playerDrawDust.Clear(); Main.playerDrawGore.Clear(); int num2 = 0; bool flag = false; bool flag2 = false; if (drawPlayer.body == 77 || drawPlayer.body == 103 || drawPlayer.body == 41 || drawPlayer.body == 100 || drawPlayer.body == 10 || drawPlayer.body == 11 || drawPlayer.body == 12 || drawPlayer.body == 13 || drawPlayer.body == 14 || drawPlayer.body == 43 || drawPlayer.body == 15 || drawPlayer.body == 16 || drawPlayer.body == 20 || drawPlayer.body == 39 || drawPlayer.body == 50 || drawPlayer.body == 38 || drawPlayer.body == 40 || drawPlayer.body == 57 || drawPlayer.body == 44 || drawPlayer.body == 52 || drawPlayer.body == 53 || drawPlayer.body == 68 || drawPlayer.body == 81 || drawPlayer.body == 85 || drawPlayer.body == 88 || drawPlayer.body == 98 || drawPlayer.body == 86 || drawPlayer.body == 87 || drawPlayer.body == 99 || drawPlayer.body == 165 || drawPlayer.body == 166 || drawPlayer.body == 167 || drawPlayer.body == 171 || drawPlayer.body == 45 || drawPlayer.body == 168) { flag = true; } if (drawPlayer.body == 99 || drawPlayer.body == 98 || drawPlayer.body == 100 || drawPlayer.body == 167 || drawPlayer.body == 171) { flag2 = true; } float num3 = (float)drawPlayer.mount.PlayerOffset; Position.Y -= num3; int num4 = 0; if (drawPlayer.dye[0] != null) { num4 = (int)drawPlayer.dye[0].dye; } int num5 = 0; if (drawPlayer.dye[1] != null) { num5 = (int)drawPlayer.dye[1].dye; } int num6 = 0; if (drawPlayer.dye[2] != null) { num6 = (int)drawPlayer.dye[2].dye; } if (drawPlayer.wearsRobe) { num6 = num5; } int num7 = 0; int num8 = 0; int num9 = 0; int num10 = 0; int num11 = 0; int num12 = 0; int num13 = 0; int num14 = 0; int num15 = 0; int num16 = 0; int num17 = 0; int num18 = 0; for (int i = 0; i < 16; i++) { int num19 = i % 8; if (drawPlayer.dye[num19] != null && drawPlayer.armor[i].type > 0 && drawPlayer.armor[i].stack > 0 && (i / 8 >= 1 || !drawPlayer.hideVisual[num19] || drawPlayer.armor[i].wingSlot > 0 || drawPlayer.armor[i].type == 934)) { if (drawPlayer.armor[i].handOnSlot > 0 && drawPlayer.armor[i].handOnSlot < 18) { num7 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].handOffSlot > 0 && drawPlayer.armor[i].handOffSlot < 11) { num8 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].backSlot > 0 && drawPlayer.armor[i].backSlot < 8) { num9 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].frontSlot > 0 && drawPlayer.armor[i].frontSlot < 5) { num10 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].shoeSlot > 0 && drawPlayer.armor[i].shoeSlot < 16) { num11 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].waistSlot > 0 && drawPlayer.armor[i].waistSlot < 11) { num12 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].shieldSlot > 0 && drawPlayer.armor[i].shieldSlot < 5) { num13 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].neckSlot > 0 && drawPlayer.armor[i].neckSlot < 7) { num14 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].faceSlot > 0 && drawPlayer.armor[i].faceSlot < 9) { num15 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].balloonSlot > 0 && drawPlayer.armor[i].balloonSlot < 11) { num16 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].wingSlot > 0 && drawPlayer.armor[i].wingSlot < 27) { num17 = (int)drawPlayer.dye[num19].dye; } if (drawPlayer.armor[i].type == 934) { num18 = (int)drawPlayer.dye[num19].dye; } } } int num20 = 0; switch (drawPlayer.team) { case 1: num20 = 1; break; case 2: num20 = 5; break; case 3: num20 = 9; break; case 4: num20 = 3; break; } if (num4 == 65) { num4 = num20; } if (num5 == 65) { num5 = num20; } if (num6 == 65) { num6 = num20; } if (num7 == 65) { num7 = num20; } if (num8 == 65) { num8 = num20; } if (num10 == 65) { num10 = num20; } if (num9 == 65) { num9 = num20; } if (num11 == 65) { num11 = num20; } if (num12 == 65) { num12 = num20; } if (num13 == 65) { num13 = num20; } if (num14 == 65) { num14 = num20; } if (num15 == 65) { num15 = num20; } if (num16 == 65) { num16 = num20; } if (num17 == 65) { num17 = num20; } if (num18 == 65) { num18 = num20; } drawPlayer.itemLocation.Y = drawPlayer.itemLocation.Y + drawPlayer.gfxOffY; SpriteEffects spriteEffects = SpriteEffects.None; SpriteEffects effect = SpriteEffects.FlipHorizontally; Color color = drawPlayer.GetImmuneAlpha(drawPlayer.GetHairColor(true), shadow); Color color2 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.25) / 16.0), Color.White), shadow); Color color3 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.eyeColor), shadow); Color color4 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.25) / 16.0), drawPlayer.skinColor), shadow); Color color5 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.skinColor), shadow); Color color6 = drawPlayer.GetImmuneAlpha(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.skinColor), shadow); Color color7 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.shirtColor), shadow); Color color8 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.5) / 16.0), drawPlayer.underShirtColor), shadow); Color color9 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.pantsColor), shadow); Color color10 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.75) / 16.0), drawPlayer.shoeColor), shadow); Color color11 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)Position.Y + (double)drawPlayer.height * 0.25) / 16, Color.White), shadow); Color color12 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)Position.Y + (double)drawPlayer.height * 0.5) / 16, Color.White), shadow); Color color13 = drawPlayer.GetImmuneAlphaPure(Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)((double)Position.Y + (double)drawPlayer.height * 0.75) / 16, Color.White), shadow); if (drawPlayer.head > 0 && drawPlayer.head < 169) { this.LoadArmorHead(drawPlayer.head); } if (drawPlayer.body > 0 && drawPlayer.body < 175) { this.LoadArmorBody(drawPlayer.body); } if (drawPlayer.legs > 0 && drawPlayer.legs < 110) { this.LoadArmorLegs(drawPlayer.legs); } if (drawPlayer.handon > 0 && drawPlayer.handon < 18) { this.LoadAccHandsOn((int)drawPlayer.handon); } if (drawPlayer.handoff > 0 && drawPlayer.handoff < 11) { this.LoadAccHandsOff((int)drawPlayer.handoff); } if (drawPlayer.back > 0 && drawPlayer.back < 8) { this.LoadAccBack((int)drawPlayer.back); } if (drawPlayer.front > 0 && drawPlayer.front < 5) { this.LoadAccFront((int)drawPlayer.front); } if (drawPlayer.shoe > 0 && drawPlayer.shoe < 16) { this.LoadAccShoes((int)drawPlayer.shoe); } if (drawPlayer.waist > 0 && drawPlayer.waist < 11) { this.LoadAccWaist((int)drawPlayer.waist); } if (drawPlayer.shield > 0 && drawPlayer.shield < 5) { this.LoadAccShield((int)drawPlayer.shield); } if (drawPlayer.neck > 0 && drawPlayer.neck < 7) { this.LoadAccNeck((int)drawPlayer.neck); } if (drawPlayer.face > 0 && drawPlayer.face < 9) { this.LoadAccFace((int)drawPlayer.face); } if (drawPlayer.balloon > 0 && drawPlayer.balloon < 11) { this.LoadAccBalloon((int)drawPlayer.balloon); } this.LoadHair(drawPlayer.hair); if ((drawPlayer.head == 78 || drawPlayer.head == 79 || drawPlayer.head == 80) && drawPlayer.body == 51 && drawPlayer.legs == 47) { float num21 = (float)Main.mouseTextColor / 200f - 0.3f; if (shadow != 0f) { num21 = 0f; } color11.G = (byte)((float)color11.G * num21); color12.G = (byte)((float)color12.G * num21); color13.G = (byte)((float)color13.G * num21); color11.B = (byte)((float)color11.B * num21); color11.R = (byte)((float)color11.R * num21); color12.B = (byte)((float)color12.B * num21); color12.R = (byte)((float)color12.R * num21); color13.B = (byte)((float)color13.B * num21); color13.R = (byte)((float)color13.R * num21); } if (shadow > 0f) { color6 = Color.Transparent; color5 = Color.Transparent; color4 = Color.Transparent; color = Color.Transparent; color3 = Color.Transparent; color2 = Color.Transparent; } float num22 = 1f; float num23 = 1f; float num24 = 1f; float num25 = 1f; if (drawPlayer.honey && Main.rand.Next(30) == 0) { int num26 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 152, 0f, 0f, 150, default(Color), 1f); Main.dust[num26].velocity.Y = 0.3f; Dust expr_E12_cp_0 = Main.dust[num26]; expr_E12_cp_0.velocity.X = expr_E12_cp_0.velocity.X * 0.1f; Main.dust[num26].scale += (float)Main.rand.Next(3, 4) * 0.1f; Main.dust[num26].alpha = 100; Main.dust[num26].noGravity = true; Main.dust[num26].velocity += drawPlayer.velocity * 0.1f; Main.playerDrawDust.Add(num26); } if (drawPlayer.poisoned) { if (Main.rand.Next(50) == 0) { int num27 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 46, 0f, 0f, 150, default(Color), 0.2f); Main.dust[num27].noGravity = true; Main.dust[num27].fadeIn = 1.9f; Main.playerDrawDust.Add(num27); } num22 *= 0.65f; num24 *= 0.75f; } if (drawPlayer.venom) { if (Main.rand.Next(10) == 0) { int num28 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 171, 0f, 0f, 100, default(Color), 0.5f); Main.dust[num28].noGravity = true; Main.dust[num28].fadeIn = 1.5f; Main.playerDrawDust.Add(num28); } num23 *= 0.45f; num22 *= 0.75f; } if (drawPlayer.onFire) { if (Main.rand.Next(4) == 0) { int num29 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 6, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, default(Color), 3f); Main.dust[num29].noGravity = true; Main.dust[num29].velocity *= 1.8f; Dust expr_1072_cp_0 = Main.dust[num29]; expr_1072_cp_0.velocity.Y = expr_1072_cp_0.velocity.Y - 0.5f; Main.playerDrawDust.Add(num29); } num24 *= 0.6f; num23 *= 0.7f; } if (drawPlayer.dripping && shadow == 0f && Main.rand.Next(4) != 0) { Vector2 position = Position; position.X -= 2f; position.Y -= 2f; if (Main.rand.Next(2) == 0) { int num30 = Dust.NewDust(position, drawPlayer.width + 4, drawPlayer.height + 2, 211, 0f, 0f, 50, default(Color), 0.8f); if (Main.rand.Next(2) == 0) { Main.dust[num30].alpha += 25; } if (Main.rand.Next(2) == 0) { Main.dust[num30].alpha += 25; } Main.dust[num30].noLight = true; Main.dust[num30].velocity *= 0.2f; Dust expr_11BA_cp_0 = Main.dust[num30]; expr_11BA_cp_0.velocity.Y = expr_11BA_cp_0.velocity.Y + 0.2f; Main.dust[num30].velocity += drawPlayer.velocity; Main.playerDrawDust.Add(num30); } else { int num31 = Dust.NewDust(position, drawPlayer.width + 8, drawPlayer.height + 8, 211, 0f, 0f, 50, default(Color), 1.1f); if (Main.rand.Next(2) == 0) { Main.dust[num31].alpha += 25; } if (Main.rand.Next(2) == 0) { Main.dust[num31].alpha += 25; } Main.dust[num31].noLight = true; Main.dust[num31].noGravity = true; Main.dust[num31].velocity *= 0.2f; Dust expr_12BF_cp_0 = Main.dust[num31]; expr_12BF_cp_0.velocity.Y = expr_12BF_cp_0.velocity.Y + 1f; Main.dust[num31].velocity += drawPlayer.velocity; Main.playerDrawDust.Add(num31); } } if (drawPlayer.drippingSlime && shadow == 0f) { int alpha = 175; Color newColor = new Color(0, 80, 255, 100); if (Main.rand.Next(4) != 0) { Vector2 position2 = Position; position2.X -= 2f; position2.Y -= 2f; if (Main.rand.Next(2) == 0) { int num32 = Dust.NewDust(position2, drawPlayer.width + 4, drawPlayer.height + 2, 4, 0f, 0f, alpha, newColor, 1.4f); if (Main.rand.Next(2) == 0) { Main.dust[num32].alpha += 25; } if (Main.rand.Next(2) == 0) { Main.dust[num32].alpha += 25; } Main.dust[num32].noLight = true; Main.dust[num32].velocity *= 0.2f; Dust expr_141D_cp_0 = Main.dust[num32]; expr_141D_cp_0.velocity.Y = expr_141D_cp_0.velocity.Y + 0.2f; Main.dust[num32].velocity += drawPlayer.velocity; Main.playerDrawDust.Add(num32); } } num22 *= 0.8f; num23 *= 0.8f; } if (drawPlayer.ichor) { num24 = 0f; } if (drawPlayer.burned) { int num33 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 6, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, default(Color), 2f); Main.dust[num33].noGravity = true; Main.dust[num33].velocity *= 1.8f; Dust expr_1528_cp_0 = Main.dust[num33]; expr_1528_cp_0.velocity.Y = expr_1528_cp_0.velocity.Y - 0.75f; Main.playerDrawDust.Add(num33); num22 = 1f; num24 *= 0.6f; num23 *= 0.7f; } if (drawPlayer.onFrostBurn) { if (Main.rand.Next(4) == 0) { int num34 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 135, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, default(Color), 3f); Main.dust[num34].noGravity = true; Main.dust[num34].velocity *= 1.8f; Dust expr_1621_cp_0 = Main.dust[num34]; expr_1621_cp_0.velocity.Y = expr_1621_cp_0.velocity.Y - 0.5f; Main.playerDrawDust.Add(num34); } num22 *= 0.5f; num23 *= 0.7f; } if (drawPlayer.onFire2) { if (Main.rand.Next(4) == 0) { int num35 = Dust.NewDust(new Vector2(Position.X - 2f, Position.Y - 2f), drawPlayer.width + 4, drawPlayer.height + 4, 75, drawPlayer.velocity.X * 0.4f, drawPlayer.velocity.Y * 0.4f, 100, default(Color), 3f); Main.dust[num35].noGravity = true; Main.dust[num35].velocity *= 1.8f; Dust expr_1710_cp_0 = Main.dust[num35]; expr_1710_cp_0.velocity.Y = expr_1710_cp_0.velocity.Y - 0.5f; Main.playerDrawDust.Add(num35); } num24 *= 0.6f; num23 *= 0.7f; } if (drawPlayer.noItems) { num23 *= 0.8f; num22 *= 0.65f; } if (drawPlayer.blind) { num23 *= 0.65f; num22 *= 0.7f; } if (drawPlayer.bleed) { num23 *= 0.9f; num24 *= 0.9f; if (!drawPlayer.dead && Main.rand.Next(30) == 0) { int num36 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 5, 0f, 0f, 0, default(Color), 1f); Dust expr_17ED_cp_0 = Main.dust[num36]; expr_17ED_cp_0.velocity.Y = expr_17ED_cp_0.velocity.Y + 0.5f; Main.dust[num36].velocity *= 0.25f; Main.playerDrawDust.Add(num36); } } if (shadow == 0f && drawPlayer.palladiumRegen && drawPlayer.statLife < drawPlayer.statLifeMax2 && base.IsActive && !Main.gamePaused && drawPlayer.miscCounter % 10 == 0) { Vector2 position3; position3.X = Position.X + (float)Main.rand.Next(drawPlayer.width); position3.Y = Position.Y + (float)Main.rand.Next(drawPlayer.height); position3.X = Position.X + (float)(drawPlayer.width / 2) - 6f; position3.Y = Position.Y + (float)(drawPlayer.height / 2) - 6f; position3.X -= (float)Main.rand.Next(-10, 11); position3.Y -= (float)Main.rand.Next(-20, 21); int num37 = Gore.NewGore(position3, new Vector2((float)Main.rand.Next(-10, 11) * 0.1f, (float)Main.rand.Next(-20, -10) * 0.1f), 331, (float)Main.rand.Next(80, 120) * 0.01f); Main.playerDrawGore.Add(num37); } if (shadow == 0f && drawPlayer.loveStruck && base.IsActive && !Main.gamePaused && Main.rand.Next(5) == 0) { Vector2 value = new Vector2((float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11)); value.Normalize(); value.X *= 0.66f; int num38 = Gore.NewGore(Position + new Vector2((float)Main.rand.Next(drawPlayer.width + 1), (float)Main.rand.Next(drawPlayer.height + 1)), value * (float)Main.rand.Next(3, 6) * 0.33f, 331, (float)Main.rand.Next(40, 121) * 0.01f); Main.gore[num38].sticky = false; Main.gore[num38].velocity *= 0.4f; Gore expr_1AA9_cp_0 = Main.gore[num38]; expr_1AA9_cp_0.velocity.Y = expr_1AA9_cp_0.velocity.Y - 0.6f; Main.playerDrawGore.Add(num38); } if (shadow == 0f && drawPlayer.stinky && base.IsActive && !Main.gamePaused) { num22 *= 0.7f; num24 *= 0.55f; if (Main.rand.Next(5) == 0) { Vector2 value2 = new Vector2((float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11)); value2.Normalize(); value2.X *= 0.66f; value2.Y = Math.Abs(value2.Y); Vector2 vector = value2 * (float)Main.rand.Next(3, 5) * 0.25f; int num39 = Dust.NewDust(Position, drawPlayer.width, drawPlayer.height, 188, vector.X, vector.Y * 0.5f, 100, default(Color), 1.5f); Main.dust[num39].velocity *= 0.1f; Dust expr_1BF0_cp_0 = Main.dust[num39]; expr_1BF0_cp_0.velocity.Y = expr_1BF0_cp_0.velocity.Y - 0.5f; Main.playerDrawDust.Add(num39); } } if (num22 != 1f || num23 != 1f || num24 != 1f || num25 != 1f) { if (drawPlayer.onFire || drawPlayer.onFire2 || drawPlayer.onFrostBurn) { color2 = drawPlayer.GetImmuneAlpha(Color.White, shadow); color3 = drawPlayer.GetImmuneAlpha(drawPlayer.eyeColor, shadow); color = drawPlayer.GetImmuneAlpha(drawPlayer.GetHairColor(true), shadow); color4 = drawPlayer.GetImmuneAlpha(drawPlayer.skinColor, shadow); color5 = drawPlayer.GetImmuneAlpha(drawPlayer.skinColor, shadow); color7 = drawPlayer.GetImmuneAlpha(drawPlayer.shirtColor, shadow); color8 = drawPlayer.GetImmuneAlpha(drawPlayer.underShirtColor, shadow); color9 = drawPlayer.GetImmuneAlpha(drawPlayer.pantsColor, shadow); color10 = drawPlayer.GetImmuneAlpha(drawPlayer.shoeColor, shadow); color11 = drawPlayer.GetImmuneAlpha(Color.White, shadow); color12 = drawPlayer.GetImmuneAlpha(Color.White, shadow); color13 = drawPlayer.GetImmuneAlpha(Color.White, shadow); } else { color2 = Main.buffColor(color2, num22, num23, num24, num25); color3 = Main.buffColor(color3, num22, num23, num24, num25); color = Main.buffColor(color, num22, num23, num24, num25); color4 = Main.buffColor(color4, num22, num23, num24, num25); color5 = Main.buffColor(color5, num22, num23, num24, num25); color7 = Main.buffColor(color7, num22, num23, num24, num25); color8 = Main.buffColor(color8, num22, num23, num24, num25); color9 = Main.buffColor(color9, num22, num23, num24, num25); color10 = Main.buffColor(color10, num22, num23, num24, num25); color11 = Main.buffColor(color11, num22, num23, num24, num25); color12 = Main.buffColor(color12, num22, num23, num24, num25); color13 = Main.buffColor(color13, num22, num23, num24, num25); } } if (drawPlayer.socialGhost) { color2 = Color.Transparent; color3 = Color.Transparent; color = Color.Transparent; color4 = Color.Transparent; color5 = Color.Transparent; color7 = Color.Transparent; color8 = Color.Transparent; color9 = Color.Transparent; color10 = Color.Transparent; color6 = Color.Transparent; if (color11.A > Main.gFade) { color11.A = Main.gFade; } if (color12.A > Main.gFade) { color12.A = Main.gFade; } if (color13.A > Main.gFade) { color13.A = Main.gFade; } } float num40 = 1f; if (drawPlayer.armorSteath) { float num41 = drawPlayer.stealth; if ((double)num41 < 0.03) { num41 = 0.03f; } float num42 = (1f + num41 * 10f) / 11f; if (num41 < 0f) { num41 = 0f; } if (num41 >= 1f - shadow && shadow > 0f) { num41 = shadow * 0.5f; } num40 = num42; color11 = new Color((int)((byte)((float)color11.R * num41)), (int)((byte)((float)color11.G * num41)), (int)((byte)((float)color11.B * num42)), (int)((byte)((float)color11.A * num41))); color12 = new Color((int)((byte)((float)color12.R * num41)), (int)((byte)((float)color12.G * num41)), (int)((byte)((float)color12.B * num42)), (int)((byte)((float)color12.A * num41))); color13 = new Color((int)((byte)((float)color13.R * num41)), (int)((byte)((float)color13.G * num41)), (int)((byte)((float)color13.B * num42)), (int)((byte)((float)color13.A * num41))); num41 *= num41; color2 = Color.Multiply(color2, num41); color3 = Color.Multiply(color3, num41); color = Color.Multiply(color, num41); color4 = Color.Multiply(color4, num41); color5 = Color.Multiply(color5, num41); color7 = Color.Multiply(color7, num41); color8 = Color.Multiply(color8, num41); color9 = Color.Multiply(color9, num41); color10 = Color.Multiply(color10, num41); color6 = Color.Multiply(color6, num41); } if (drawPlayer.gravDir == 1f) { if (drawPlayer.direction == 1) { spriteEffects = SpriteEffects.None; effect = SpriteEffects.None; } else { spriteEffects = SpriteEffects.FlipHorizontally; effect = SpriteEffects.FlipHorizontally; } if (!drawPlayer.dead) { drawPlayer.legPosition.Y = 0f; drawPlayer.headPosition.Y = 0f; drawPlayer.bodyPosition.Y = 0f; } } else { if (drawPlayer.direction == 1) { spriteEffects = SpriteEffects.FlipVertically; effect = SpriteEffects.FlipVertically; } else { spriteEffects = (SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically); effect = (SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically); } if (!drawPlayer.dead) { drawPlayer.legPosition.Y = 6f; drawPlayer.headPosition.Y = 6f; drawPlayer.bodyPosition.Y = 6f; } } Vector2 vector2 = new Vector2((float)drawPlayer.legFrame.Width * 0.5f, (float)drawPlayer.legFrame.Height * 0.75f); Vector2 origin = new Vector2((float)drawPlayer.legFrame.Width * 0.5f, (float)drawPlayer.legFrame.Height * 0.5f); Vector2 vector3 = new Vector2((float)drawPlayer.legFrame.Width * 0.5f, (float)drawPlayer.legFrame.Height * 0.4f); if (drawPlayer.merman) { drawPlayer.headRotation = drawPlayer.velocity.Y * (float)drawPlayer.direction * 0.1f; if ((double)drawPlayer.headRotation < -0.3) { drawPlayer.headRotation = -0.3f; } if ((double)drawPlayer.headRotation > 0.3) { drawPlayer.headRotation = 0.3f; } } else { if (!drawPlayer.dead) { drawPlayer.headRotation = 0f; } } bool flag3 = false; if (drawPlayer.head == 10 || drawPlayer.head == 12 || drawPlayer.head == 28 || drawPlayer.head == 62 || drawPlayer.head == 97 || drawPlayer.head == 106 || drawPlayer.head == 113 || drawPlayer.head == 116 || drawPlayer.head == 119 || drawPlayer.head == 133 || drawPlayer.head == 138 || drawPlayer.head == 139 || drawPlayer.head == 163) { flag3 = true; } bool flag4 = false; if (drawPlayer.head == 161 || drawPlayer.head == 14 || drawPlayer.head == 15 || drawPlayer.head == 16 || drawPlayer.head == 18 || drawPlayer.head == 21 || drawPlayer.head == 24 || drawPlayer.head == 25 || drawPlayer.head == 26 || drawPlayer.head == 40 || drawPlayer.head == 44 || drawPlayer.head == 51 || drawPlayer.head == 56 || drawPlayer.head == 59 || drawPlayer.head == 60 || drawPlayer.head == 67 || drawPlayer.head == 68 || drawPlayer.head == 69 || drawPlayer.head == 114 || drawPlayer.head == 121 || drawPlayer.head == 126 || drawPlayer.head == 130 || drawPlayer.head == 136 || drawPlayer.head == 140 || drawPlayer.head == 145 || drawPlayer.head == 158 || drawPlayer.head == 159) { flag4 = true; } bool flag5 = false; if (drawPlayer.face == 4 || drawPlayer.face == 3 || drawPlayer.face == 2) { flag5 = true; } Rectangle bodyFrame = drawPlayer.bodyFrame; bodyFrame.Y -= 336; if (bodyFrame.Y < 0) { bodyFrame.Y = 0; } int height = 26; int hair = drawPlayer.hair; if (flag5) { bodyFrame.Height = 0; } else { if (hair > 50 && (hair < 56 || hair > 63) && (hair < 74 || hair > 77) && (hair < 88 || hair > 89) && hair != 94 && hair != 100 && hair != 104 && hair != 112 && hair < 116) { if (drawPlayer.head == -1 || flag3 || drawPlayer.head == 23 || drawPlayer.head == 0) { DrawData value3 = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(bodyFrame), color, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } else { if (flag4) { DrawData value3 = new DrawData(Main.playerHairAltTexture[drawPlayer.hair], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(bodyFrame), color, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (drawPlayer.gravDir == 1f) { bodyFrame.Height = height; } } } if (drawPlayer.mount.Active) { int num43 = drawPlayer.mount.XOffset; int num44 = drawPlayer.mount.YOffset + (int)num3; if (drawPlayer.direction <= 0) { num43 *= -1; } Texture2D texture2D = drawPlayer.mount.BackTexture; if (texture2D != null) { DrawData value3 = new DrawData(texture2D, new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) + (float)num43)), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + (float)num44))), new Rectangle?(drawPlayer.mount.FrameRect), color12, drawPlayer.bodyRotation, drawPlayer.mount.Origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } texture2D = drawPlayer.mount.BackTextureExtra; if (texture2D != null && shadow == 0f) { DrawData value3 = new DrawData(texture2D, new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) + (float)num43)), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + (float)num44))), new Rectangle?(drawPlayer.mount.FrameRectExtra), color12, drawPlayer.bodyRotation, drawPlayer.mount.Origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (drawPlayer.carpetFrame >= 0) { Color color14 = color13; float num45 = 0f; if (drawPlayer.gravDir == -1f) { num45 = 10f; } DrawData value3 = new DrawData(Main.flyingCarpetTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + 28f * drawPlayer.gravDir + num45))), new Rectangle?(new Rectangle(0, Main.flyingCarpetTexture.Height / 6 * drawPlayer.carpetFrame, Main.flyingCarpetTexture.Width, Main.flyingCarpetTexture.Height / 6)), color14, drawPlayer.bodyRotation, new Vector2((float)(Main.flyingCarpetTexture.Width / 2), (float)(Main.flyingCarpetTexture.Height / 8)), 1f, spriteEffects, 0); value3.shader = num18; Main.playerDrawData.Add(value3); } bool flag6 = false; if ((drawPlayer.wings == 0 || drawPlayer.velocity.Y == 0f) && (drawPlayer.inventory[drawPlayer.selectedItem].type == 1178 || drawPlayer.inventory[drawPlayer.selectedItem].type == 779 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1295 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1910 || drawPlayer.turtleArmor || drawPlayer.body == 106 || drawPlayer.body == 170)) { flag6 = true; int type = drawPlayer.inventory[drawPlayer.selectedItem].type; int num46 = 1; float num47 = -4f; float num48 = -8f; int shader = 0; if (drawPlayer.turtleArmor) { num46 = 4; shader = num5; } else { if (drawPlayer.body == 106) { num46 = 6; shader = num5; } else { if (drawPlayer.body == 170) { num46 = 7; shader = num5; } else { if (type == 1178) { num46 = 1; } else { if (type == 779) { num46 = 2; } else { if (type == 1295) { num46 = 3; } else { if (type == 1910) { num46 = 5; } } } } } } } if (num46 == 7) { DrawData value3 = new DrawData(Main.BackPackTexture[num46], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(new Rectangle(0, drawPlayer.bodyFrame.Y, Main.BackPackTexture[num46].Width, drawPlayer.bodyFrame.Height)), color12, drawPlayer.bodyRotation, new Vector2((float)Main.BackPackTexture[num46].Width * 0.5f, origin.Y), 1f, spriteEffects, 0); value3.shader = shader; Main.playerDrawData.Add(value3); } else { if (num46 == 4 || num46 == 6) { DrawData value3 = new DrawData(Main.BackPackTexture[num46], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = shader; Main.playerDrawData.Add(value3); } else { DrawData value3 = new DrawData(Main.BackPackTexture[num46], new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) - (float)(9 * drawPlayer.direction))) + num47 * (float)drawPlayer.direction, (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + 2f * drawPlayer.gravDir + num48 * drawPlayer.gravDir))), new Rectangle?(new Rectangle(0, 0, Main.BackPackTexture[num46].Width, Main.BackPackTexture[num46].Height)), color12, drawPlayer.bodyRotation, new Vector2((float)(Main.BackPackTexture[num46].Width / 2), (float)(Main.BackPackTexture[num46].Height / 2)), 1f, spriteEffects, 0); value3.shader = shader; Main.playerDrawData.Add(value3); } } } if (!flag6 && drawPlayer.back > 0 && drawPlayer.back < 8 && !drawPlayer.mount.Active) { if (drawPlayer.front >= 1 && drawPlayer.front <= 4) { int num49 = drawPlayer.bodyFrame.Y / 56; if (num49 < 1 || num49 > 5) { num2 = 10; } else { if (drawPlayer.front == 1) { num2 = 0; } if (drawPlayer.front == 2) { num2 = 8; } if (drawPlayer.front == 3) { num2 = 0; } if (drawPlayer.front == 4) { num2 = 8; } } } DrawData value3 = new DrawData(Main.accBackTexture[(int)drawPlayer.back], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = num9; Main.playerDrawData.Add(value3); } Position.Y += num3 / 2f; if (!flag6 && drawPlayer.wings > 0) { this.LoadWings(drawPlayer.wings); if (drawPlayer.wings == 22) { if ((drawPlayer.velocity.Y != 0f || drawPlayer.grappling[0] != -1) && !drawPlayer.mount.Active) { this.LoadItemFlames(1866); Color color15 = color12; int num50 = 24; int num51 = 0; DrawData value3; if (shadow == 0f && drawPlayer.grappling[0] == -1) { for (int j = 0; j < 7; j++) { Color color16 = new Color(250 - j * 10, 250 - j * 10, 250 - j * 10, 150 - j * 10); Vector2 vector4 = new Vector2((float)Main.rand.Next(-10, 11) * 0.2f, (float)Main.rand.Next(-10, 11) * 0.2f); num40 *= num40; num40 *= 1f - shadow; color16 = new Color((int)((float)color16.R * num40), (int)((float)color16.G * num40), (int)((float)color16.B * num40), (int)((float)color16.A * num40)); vector4.X = drawPlayer.itemFlamePos[j].X; vector4.Y = -drawPlayer.itemFlamePos[j].Y; vector4 *= 0.5f; value3 = new DrawData(Main.itemFlameTexture[1866], new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) - (float)(9 * drawPlayer.direction)) + num51 * drawPlayer.direction), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + 2f * drawPlayer.gravDir + (float)num50 * drawPlayer.gravDir))) + vector4, new Rectangle?(new Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 7 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 7 - 2)), color16, drawPlayer.bodyRotation, new Vector2((float)(Main.wingsTexture[drawPlayer.wings].Width / 2), (float)(Main.wingsTexture[drawPlayer.wings].Height / 14)), 1f, spriteEffects, 0); value3.shader = num17; Main.playerDrawData.Add(value3); } } value3 = new DrawData(Main.wingsTexture[drawPlayer.wings], new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) - (float)(9 * drawPlayer.direction)) + num51 * drawPlayer.direction), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + 2f * drawPlayer.gravDir + (float)num50 * drawPlayer.gravDir))), new Rectangle?(new Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 7 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 7)), color15, drawPlayer.bodyRotation, new Vector2((float)(Main.wingsTexture[drawPlayer.wings].Width / 2), (float)(Main.wingsTexture[drawPlayer.wings].Height / 14)), 1f, spriteEffects, 0); value3.shader = num17; Main.playerDrawData.Add(value3); } } else { int num52 = 0; int num53 = 0; if (drawPlayer.wings == 5) { num53 = 4; num52 -= 4; } Color color17 = color12; if (drawPlayer.wings == 9) { num40 *= num40; num40 *= 1f - shadow; color17 = new Color((int)(250f * num40), (int)(250f * num40), (int)(250f * num40), (int)(100f * num40)); } if (drawPlayer.wings == 10) { num40 *= num40; num40 *= 1f - shadow; color17 = new Color((int)(250f * num40), (int)(250f * num40), (int)(250f * num40), (int)(175f * num40)); } if (drawPlayer.wings == 11 && color17.A > Main.gFade) { color17.A = Main.gFade; } DrawData value3 = new DrawData(Main.wingsTexture[drawPlayer.wings], new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) - (float)(9 * drawPlayer.direction)) + num53 * drawPlayer.direction), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + 2f * drawPlayer.gravDir + (float)num52 * drawPlayer.gravDir))), new Rectangle?(new Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), color17, drawPlayer.bodyRotation, new Vector2((float)(Main.wingsTexture[drawPlayer.wings].Width / 2), (float)(Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); value3.shader = num17; Main.playerDrawData.Add(value3); if (drawPlayer.wings == 23) { num40 *= num40; num40 *= 1f - shadow; color17 = new Color((int)(200f * num40), (int)(200f * num40), (int)(200f * num40), (int)(200f * num40)); value3 = new DrawData(Main.FlameTexture[8], new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) - (float)(9 * drawPlayer.direction)) + num53 * drawPlayer.direction), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + 2f * drawPlayer.gravDir + (float)num52 * drawPlayer.gravDir))), new Rectangle?(new Rectangle(0, Main.wingsTexture[drawPlayer.wings].Height / 4 * drawPlayer.wingFrame, Main.wingsTexture[drawPlayer.wings].Width, Main.wingsTexture[drawPlayer.wings].Height / 4)), color17, drawPlayer.bodyRotation, new Vector2((float)(Main.wingsTexture[drawPlayer.wings].Width / 2), (float)(Main.wingsTexture[drawPlayer.wings].Height / 8)), 1f, spriteEffects, 0); value3.shader = num17; Main.playerDrawData.Add(value3); } } } if (drawPlayer.balloon > 0) { int num54 = DateTime.Now.Millisecond % 800 / 200; Vector2 vector5 = Main.offHandOffsets[drawPlayer.bodyFrame.Y / 56]; if (drawPlayer.direction != 1) { vector5.X = (float)drawPlayer.width - vector5.X; } if (drawPlayer.gravDir != 1f) { vector5.Y -= (float)drawPlayer.height; } DrawData value3 = new DrawData(Main.accBalloonTexture[(int)drawPlayer.balloon], new Vector2((float)((int)(Position.X - Main.screenPosition.X + vector5.X)), (float)((int)(Position.Y - Main.screenPosition.Y + vector5.Y * drawPlayer.gravDir))), new Rectangle?(new Rectangle(0, Main.accBalloonTexture[(int)drawPlayer.balloon].Height / 4 * num54, Main.accBalloonTexture[(int)drawPlayer.balloon].Width, Main.accBalloonTexture[(int)drawPlayer.balloon].Height / 4)), color12, drawPlayer.bodyRotation, new Vector2((float)(26 + drawPlayer.direction * 4), 28f + drawPlayer.gravDir * 6f), 1f, spriteEffects, 0); value3.shader = num16; Main.playerDrawData.Add(value3); } Position.Y -= num3 / 2f; if (!drawPlayer.invis && drawPlayer.body != 83 && drawPlayer.body != 82 && drawPlayer.body != 93) { DrawData value3 = new DrawData(Main.skinBodyTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); if (drawPlayer.legs != 67 && drawPlayer.legs != 106 && drawPlayer.shoe != 15) { value3 = new DrawData(Main.skinLegsTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.legFrame), color6, drawPlayer.legRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (drawPlayer.wearsRobe) { goto IL_3CA6; } IL_38CB: if (drawPlayer.legs > 0 && drawPlayer.legs < 110 && (drawPlayer.shoe != 15 || drawPlayer.wearsRobe)) { if (!drawPlayer.invis || (drawPlayer.legs != 20 && drawPlayer.legs != 21)) { DrawData value3 = new DrawData(Main.armorLegTexture[drawPlayer.legs], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.legFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.legFrame.Height + 4f))) + drawPlayer.legPosition + vector2, new Rectangle?(drawPlayer.legFrame), color13, drawPlayer.legRotation, vector2, 1f, spriteEffects, 0); value3.shader = num6; Main.playerDrawData.Add(value3); } } else { if (!drawPlayer.invis && drawPlayer.shoe != 15) { if (!drawPlayer.male) { DrawData value3 = new DrawData(Main.femalePantsTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.legFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.legFrame.Height + 4f))) + drawPlayer.legPosition + vector2, new Rectangle?(drawPlayer.legFrame), color9, drawPlayer.legRotation, vector2, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); value3 = new DrawData(Main.femaleShoesTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.legFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.legFrame.Height + 4f))) + drawPlayer.legPosition + vector2, new Rectangle?(drawPlayer.legFrame), color10, drawPlayer.legRotation, vector2, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } else { DrawData value3 = new DrawData(Main.playerPantsTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.legFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.legFrame.Height + 4f))) + drawPlayer.legPosition + vector2, new Rectangle?(drawPlayer.legFrame), color9, drawPlayer.legRotation, vector2, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); value3 = new DrawData(Main.playerShoesTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.legFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.legFrame.Height + 4f))) + drawPlayer.legPosition + vector2, new Rectangle?(drawPlayer.legFrame), color10, drawPlayer.legRotation, vector2, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } } if (drawPlayer.wearsRobe) { goto IL_3D81; } IL_3CA6: if (drawPlayer.shoe > 0 && drawPlayer.shoe < 16) { DrawData value3 = new DrawData(Main.accShoesTexture[(int)drawPlayer.shoe], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.legFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.legFrame.Height + 4f))) + drawPlayer.legPosition + vector2, new Rectangle?(drawPlayer.legFrame), color13, drawPlayer.legRotation, vector2, 1f, spriteEffects, 0); value3.shader = num11; Main.playerDrawData.Add(value3); } if (drawPlayer.wearsRobe) { goto IL_38CB; } IL_3D81: if (drawPlayer.body > 0 && drawPlayer.body < 175) { Rectangle bodyFrame2 = drawPlayer.bodyFrame; int num55 = num2; bodyFrame2.X += num55; bodyFrame2.Width -= num55; if (drawPlayer.direction == -1) { num55 = 0; } if (!drawPlayer.invis || (drawPlayer.body != 21 && drawPlayer.body != 22)) { if (!drawPlayer.male) { DrawData value3 = new DrawData(Main.femaleBodyTexture[drawPlayer.body], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2)) + num55), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(bodyFrame2), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = num5; Main.playerDrawData.Add(value3); } else { DrawData value3 = new DrawData(Main.armorBodyTexture[drawPlayer.body], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2)) + num55), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(bodyFrame2), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = num5; Main.playerDrawData.Add(value3); } } if (flag && !drawPlayer.invis) { DrawData value3 = new DrawData(Main.playerHandsTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } else { if (!drawPlayer.invis) { DrawData value3; if (!drawPlayer.male) { value3 = new DrawData(Main.femaleUnderShirtTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color8, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); value3 = new DrawData(Main.femaleShirtTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color7, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } else { value3 = new DrawData(Main.playerUnderShirtTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color8, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); value3 = new DrawData(Main.playerShirtTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color7, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } value3 = new DrawData(Main.playerHandsTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (drawPlayer.handoff > 0 && drawPlayer.handoff < 11) { DrawData value3 = new DrawData(Main.accHandsOffTexture[(int)drawPlayer.handoff], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = num8; Main.playerDrawData.Add(value3); } if (drawPlayer.waist > 0 && drawPlayer.waist < 11) { Rectangle legFrame = drawPlayer.legFrame; if (legFrame.Y >= 1064) { legFrame.Y = 0; } DrawData value3 = new DrawData(Main.accWaistTexture[(int)drawPlayer.waist], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.legFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.legFrame.Height + 4f))) + drawPlayer.legPosition + vector2, new Rectangle?(legFrame), color13, drawPlayer.legRotation, vector2, 1f, spriteEffects, 0); value3.shader = num12; Main.playerDrawData.Add(value3); } if (drawPlayer.neck > 0 && drawPlayer.neck < 7) { DrawData value3 = new DrawData(Main.accNeckTexture[(int)drawPlayer.neck], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = num14; Main.playerDrawData.Add(value3); } if (!drawPlayer.invis && drawPlayer.head != 38 && drawPlayer.head != 135) { DrawData value3 = new DrawData(Main.playerHeadTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(drawPlayer.bodyFrame), color4, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); value3 = new DrawData(Main.playerEyeWhitesTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(drawPlayer.bodyFrame), color2, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); value3 = new DrawData(Main.playerEyesTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(drawPlayer.bodyFrame), color3, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } if (flag3) { DrawData value3 = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(drawPlayer.bodyFrame), color11, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); value3.shader = num4; Main.playerDrawData.Add(value3); if (!drawPlayer.invis) { value3 = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(bodyFrame), color, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (flag4 && !drawPlayer.invis) { DrawData value3 = new DrawData(Main.playerHairAltTexture[drawPlayer.hair], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(bodyFrame), color, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } if (drawPlayer.head == 23) { DrawData value3; if (!drawPlayer.invis) { value3 = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(bodyFrame), color, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } value3 = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(drawPlayer.bodyFrame), color11, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); value3.shader = num4; Main.playerDrawData.Add(value3); } else { if (drawPlayer.head == 14 || drawPlayer.head == 56 || drawPlayer.head == 114 || drawPlayer.head == 158 || drawPlayer.head == 69) { Rectangle bodyFrame3 = drawPlayer.bodyFrame; Vector2 origin2 = vector3; if (drawPlayer.gravDir == 1f) { if (bodyFrame3.Y != 0) { bodyFrame3.Y -= 2; bodyFrame3.Height -= 8; origin2.Y += 2f; } } else { if (bodyFrame3.Y != 0) { bodyFrame3.Y -= 2; origin2.Y -= 10f; bodyFrame3.Height -= 8; } } DrawData value3 = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(bodyFrame3), color11, drawPlayer.headRotation, origin2, 1f, spriteEffects, 0); value3.shader = num4; Main.playerDrawData.Add(value3); } else { if (drawPlayer.head > 0 && drawPlayer.head < 169 && drawPlayer.head != 28) { if (!drawPlayer.invis || (drawPlayer.head != 39 && drawPlayer.head != 38)) { if (drawPlayer.head > 0 && drawPlayer.head < 169) { this.LoadArmorHead(drawPlayer.head); } DrawData value3 = new DrawData(Main.armorHeadTexture[drawPlayer.head], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(drawPlayer.bodyFrame), color11, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); value3.shader = num4; Main.playerDrawData.Add(value3); } } else { if (!drawPlayer.invis && drawPlayer.face != 3 && drawPlayer.face != 2 && drawPlayer.face != 4) { DrawData value3 = new DrawData(Main.playerHairTexture[drawPlayer.hair], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(bodyFrame), color, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } } } if (drawPlayer.head == 137) { DrawData value3 = new DrawData(Main.jackHatTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(drawPlayer.bodyFrame), new Color(255, 255, 255, 255), drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); for (int k = 0; k < 7; k++) { Color color18 = new Color(110 - k * 10, 110 - k * 10, 110 - k * 10, 110 - k * 10); Vector2 vector6 = new Vector2((float)Main.rand.Next(-10, 11) * 0.2f, (float)Main.rand.Next(-10, 11) * 0.2f); vector6.X = drawPlayer.itemFlamePos[k].X; vector6.Y = drawPlayer.itemFlamePos[k].Y; vector6 *= 0.5f; value3 = new DrawData(Main.jackHatTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3 + vector6, new Rectangle?(drawPlayer.bodyFrame), color18, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (drawPlayer.face > 0 && drawPlayer.face < 9) { if (drawPlayer.face == 7) { DrawData value3 = new DrawData(Main.accFaceTexture[(int)drawPlayer.face], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(drawPlayer.bodyFrame), new Color(200, 200, 200, 150), drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); value3.shader = num15; Main.playerDrawData.Add(value3); } else { DrawData value3 = new DrawData(Main.accFaceTexture[(int)drawPlayer.face], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.headPosition + vector3, new Rectangle?(drawPlayer.bodyFrame), color11, drawPlayer.headRotation, vector3, 1f, spriteEffects, 0); value3.shader = num15; Main.playerDrawData.Add(value3); } } if (drawPlayer.mount.Active) { int num56 = drawPlayer.mount.XOffset; int num57 = drawPlayer.mount.YOffset + (int)num3; if (drawPlayer.direction <= 0 && drawPlayer.mount.Type != 6) { num56 *= -1; } Texture2D texture2D2 = drawPlayer.mount.FrontTexture; SpriteEffects effect2; if (drawPlayer.mount.Type == 6) { effect2 = (drawPlayer.mount.FlipDraw ? SpriteEffects.FlipHorizontally : SpriteEffects.None); } else { effect2 = spriteEffects; } if (texture2D2 != null) { DrawData value3 = new DrawData(texture2D2, new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) + (float)num56)), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + (float)num57))), new Rectangle?(drawPlayer.mount.FrameRect), color12, drawPlayer.bodyRotation, drawPlayer.mount.Origin, 1f, effect2, 0); Main.playerDrawData.Add(value3); } texture2D2 = drawPlayer.mount.FrontTextureExtra; if (texture2D2 != null && shadow == 0f) { DrawData value3 = new DrawData(texture2D2, new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) + (float)num56)), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + (float)num57))), new Rectangle?(drawPlayer.mount.FrameRect), Color.White, drawPlayer.bodyRotation, drawPlayer.mount.Origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (drawPlayer.pulley && drawPlayer.itemAnimation == 0) { if (drawPlayer.pulleyDir == 2) { int num58 = -26; int num59 = 0; float rotation2 = 0f; DrawData value3 = new DrawData(Main.pulleyTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) - (float)(9 * drawPlayer.direction)) + num59 * drawPlayer.direction), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + 2f * drawPlayer.gravDir + (float)num58 * drawPlayer.gravDir))), new Rectangle?(new Rectangle(0, Main.pulleyTexture.Height / 2 * drawPlayer.pulleyFrame, Main.pulleyTexture.Width, Main.pulleyTexture.Height / 2)), color11, rotation2, new Vector2((float)(Main.pulleyTexture.Width / 2), (float)(Main.pulleyTexture.Height / 4)), 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } else { int num60 = -26; int num61 = 10; float rotation3 = 0.35f * (float)(-(float)drawPlayer.direction); DrawData value3 = new DrawData(Main.pulleyTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2) - (float)(9 * drawPlayer.direction)) + num61 * drawPlayer.direction), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2) + 2f * drawPlayer.gravDir + (float)num60 * drawPlayer.gravDir))), new Rectangle?(new Rectangle(0, Main.pulleyTexture.Height / 2 * drawPlayer.pulleyFrame, Main.pulleyTexture.Width, Main.pulleyTexture.Height / 2)), color11, rotation3, new Vector2((float)(Main.pulleyTexture.Width / 2), (float)(Main.pulleyTexture.Height / 4)), 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (drawPlayer.shield > 0 && drawPlayer.shield < 5) { DrawData value3 = new DrawData(Main.accShieldTexture[(int)drawPlayer.shield], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = num13; Main.playerDrawData.Add(value3); if (drawPlayer.mount.Type == 6) { Main.playerDrawData.Reverse(Main.playerDrawData.Count - 2, 2); } } if (drawPlayer.heldProj >= 0) { num = Main.playerDrawData.Count; } Color newColor2 = Lighting.GetColor((int)((double)Position.X + (double)drawPlayer.width * 0.5) / 16, (int)(((double)Position.Y + (double)drawPlayer.height * 0.5) / 16.0)); if (drawPlayer.inventory[drawPlayer.selectedItem].type == 678) { newColor2 = Color.White; } if (drawPlayer.armorSteath && drawPlayer.inventory[drawPlayer.selectedItem].ranged) { float num62 = drawPlayer.stealth; if ((double)num62 < 0.03) { num62 = 0.03f; } float num63 = (1f + num62 * 10f) / 11f; newColor2 = new Color((int)((byte)((float)newColor2.R * num62)), (int)((byte)((float)newColor2.G * num62)), (int)((byte)((float)newColor2.B * num63)), (int)((byte)((float)newColor2.A * num62))); } if (!drawPlayer.frozen && (drawPlayer.itemAnimation > 0 || (drawPlayer.inventory[drawPlayer.selectedItem].holdStyle > 0 && !drawPlayer.pulley && !drawPlayer.mount.Active)) && drawPlayer.inventory[drawPlayer.selectedItem].type > 0 && !drawPlayer.dead && !drawPlayer.inventory[drawPlayer.selectedItem].noUseGraphic && (!drawPlayer.wet || !drawPlayer.inventory[drawPlayer.selectedItem].noWet)) { string arg_5AFB_0 = drawPlayer.name; if (drawPlayer.inventory[drawPlayer.selectedItem].type == 662 || drawPlayer.inventory[drawPlayer.selectedItem].type == 663) { newColor2.R = (byte)Main.DiscoR; newColor2.G = (byte)Main.DiscoG; newColor2.B = (byte)Main.DiscoB; newColor2.A = 255; } if (drawPlayer.inventory[drawPlayer.selectedItem].useStyle == 5) { if (drawPlayer.inventory[drawPlayer.selectedItem].type == 2188 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1308 || drawPlayer.inventory[drawPlayer.selectedItem].type == 683 || drawPlayer.inventory[drawPlayer.selectedItem].type == 723 || drawPlayer.inventory[drawPlayer.selectedItem].type == 726 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1801 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1931 || (drawPlayer.inventory[drawPlayer.selectedItem].type >= 739 && drawPlayer.inventory[drawPlayer.selectedItem].type <= 744) || drawPlayer.inventory[drawPlayer.selectedItem].type == 788 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1326 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1444 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1445 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1446 || drawPlayer.inventory[drawPlayer.selectedItem].type == 1930) { float num64 = drawPlayer.itemRotation + 0.785f * (float)drawPlayer.direction; int num65 = 0; int num66 = 0; Vector2 zero = new Vector2(0f, (float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height); if (drawPlayer.gravDir == -1f) { if (drawPlayer.direction == -1) { num64 += 1.57f; zero = new Vector2((float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, 0f); num65 -= Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width; } else { num64 -= 1.57f; zero = Vector2.Zero; } } else { if (drawPlayer.direction == -1) { zero = new Vector2((float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, (float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height); num65 -= Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width; } } DrawData value3 = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float)((int)(Position.X + (float)(drawPlayer.width / 2) - Main.screenPosition.X + zero.X + (float)num65)), (float)((int)(Position.Y + (float)(drawPlayer.height / 2) - Main.screenPosition.Y + (float)num66))), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(newColor2), num64, zero, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); } else { Vector2 vector7 = new Vector2((float)(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width / 2), (float)(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height / 2)); Vector2 vector8 = this.DrawPlayerItemPos(drawPlayer); int num67 = (int)vector8.X; vector7.Y = vector8.Y; Vector2 origin3 = new Vector2((float)(-(float)num67), (float)(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height / 2)); if (drawPlayer.direction == -1) { origin3 = new Vector2((float)(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width + num67), (float)(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height / 2)); } DrawData value3 = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float)((int)(drawPlayer.itemLocation.X - Main.screenPosition.X + vector7.X)), (float)((int)(drawPlayer.itemLocation.Y - Main.screenPosition.Y + vector7.Y))), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(newColor2), drawPlayer.itemRotation, origin3, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); if (drawPlayer.inventory[drawPlayer.selectedItem].color != default(Color)) { value3 = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float)((int)(drawPlayer.itemLocation.X - Main.screenPosition.X + vector7.X)), (float)((int)(drawPlayer.itemLocation.Y - Main.screenPosition.Y + vector7.Y))), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetColor(newColor2), drawPlayer.itemRotation, origin3, drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); } } } else { if (drawPlayer.gravDir == -1f) { DrawData value3 = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float)((int)(drawPlayer.itemLocation.X - Main.screenPosition.X)), (float)((int)(drawPlayer.itemLocation.Y - Main.screenPosition.Y))), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(newColor2), drawPlayer.itemRotation, new Vector2((float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5f - (float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5f * (float)drawPlayer.direction, 0f), drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); if (drawPlayer.inventory[drawPlayer.selectedItem].color != default(Color)) { value3 = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float)((int)(drawPlayer.itemLocation.X - Main.screenPosition.X)), (float)((int)(drawPlayer.itemLocation.Y - Main.screenPosition.Y))), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetColor(newColor2), drawPlayer.itemRotation, new Vector2((float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5f - (float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5f * (float)drawPlayer.direction, 0f), drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); } } else { if (drawPlayer.inventory[drawPlayer.selectedItem].type == 425 || drawPlayer.inventory[drawPlayer.selectedItem].type == 507) { if (drawPlayer.gravDir == 1f) { if (drawPlayer.direction == 1) { effect = SpriteEffects.FlipVertically; } else { effect = (SpriteEffects.FlipHorizontally | SpriteEffects.FlipVertically); } } else { if (drawPlayer.direction == 1) { effect = SpriteEffects.None; } else { effect = SpriteEffects.FlipHorizontally; } } } int type2 = drawPlayer.inventory[drawPlayer.selectedItem].type; DrawData value3 = new DrawData(Main.itemTexture[type2], new Vector2((float)((int)(drawPlayer.itemLocation.X - Main.screenPosition.X)), (float)((int)(drawPlayer.itemLocation.Y - Main.screenPosition.Y))), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[type2].Width, Main.itemTexture[type2].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(newColor2), drawPlayer.itemRotation, new Vector2((float)Main.itemTexture[type2].Width * 0.5f - (float)Main.itemTexture[type2].Width * 0.5f * (float)drawPlayer.direction, (float)Main.itemTexture[type2].Height), drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); if (drawPlayer.inventory[drawPlayer.selectedItem].color != default(Color)) { value3 = new DrawData(Main.itemTexture[type2], new Vector2((float)((int)(drawPlayer.itemLocation.X - Main.screenPosition.X)), (float)((int)(drawPlayer.itemLocation.Y - Main.screenPosition.Y))), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[type2].Width, Main.itemTexture[type2].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetColor(newColor2), drawPlayer.itemRotation, new Vector2((float)Main.itemTexture[type2].Width * 0.5f - (float)Main.itemTexture[type2].Width * 0.5f * (float)drawPlayer.direction, (float)Main.itemTexture[type2].Height), drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); } if (drawPlayer.inventory[drawPlayer.selectedItem].flame && shadow == 0f) { try { this.LoadItemFlames(type2); if (Main.itemFlameTexture[type2] != null) { for (int l = 0; l < 7; l++) { float x = drawPlayer.itemFlamePos[l].X; float y = drawPlayer.itemFlamePos[l].Y; value3 = new DrawData(Main.itemFlameTexture[type2], new Vector2((float)((int)(drawPlayer.itemLocation.X - Main.screenPosition.X)) + x, (float)((int)(drawPlayer.itemLocation.Y - Main.screenPosition.Y)) + y), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[type2].Width, Main.itemTexture[type2].Height)), new Color(100, 100, 100, 0), drawPlayer.itemRotation, new Vector2((float)Main.itemTexture[type2].Width * 0.5f - (float)Main.itemTexture[type2].Width * 0.5f * (float)drawPlayer.direction, (float)Main.itemTexture[type2].Height), drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); } } } catch { } } } } } if (drawPlayer.body > 0 && drawPlayer.body < 175) { Rectangle bodyFrame4 = drawPlayer.bodyFrame; int num68 = num2; bodyFrame4.X += num68; bodyFrame4.Width -= num68; if (drawPlayer.direction == -1) { num68 = 0; } if (!drawPlayer.invis || (drawPlayer.body != 21 && drawPlayer.body != 22)) { DrawData value3; if (flag && !drawPlayer.invis) { int arg_690A_0 = drawPlayer.body; if (flag2) { value3 = new DrawData(Main.skinArmTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } value3 = new DrawData(Main.playerHands2Texture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } if (drawPlayer.body > 0 && drawPlayer.body < 175) { this.LoadArmorBody(drawPlayer.body); } value3 = new DrawData(Main.armorArmTexture[drawPlayer.body], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2)) + num68), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(bodyFrame4), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = num5; Main.playerDrawData.Add(value3); } } else { if (!drawPlayer.invis) { DrawData value3; if (!drawPlayer.male) { value3 = new DrawData(Main.femaleUnderShirt2Texture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color8, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); value3 = new DrawData(Main.femaleShirt2Texture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color7, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } else { value3 = new DrawData(Main.playerUnderShirt2Texture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color8, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } value3 = new DrawData(Main.playerHands2Texture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color5, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (drawPlayer.handon > 0 && drawPlayer.handon < 18) { DrawData value3 = new DrawData(Main.accHandsOnTexture[(int)drawPlayer.handon], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = num7; Main.playerDrawData.Add(value3); } if (drawPlayer.inventory[drawPlayer.selectedItem].type == 1827 && !drawPlayer.frozen && (drawPlayer.itemAnimation > 0 || (drawPlayer.inventory[drawPlayer.selectedItem].holdStyle > 0 && !drawPlayer.pulley)) && drawPlayer.inventory[drawPlayer.selectedItem].type > 0 && !drawPlayer.dead && !drawPlayer.inventory[drawPlayer.selectedItem].noUseGraphic && (!drawPlayer.wet || !drawPlayer.inventory[drawPlayer.selectedItem].noWet)) { if (drawPlayer.gravDir == -1f) { DrawData value3 = new DrawData(Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type], new Vector2((float)((int)(drawPlayer.itemLocation.X - Main.screenPosition.X)), (float)((int)(drawPlayer.itemLocation.Y - Main.screenPosition.Y))), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width, Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(newColor2), drawPlayer.itemRotation, new Vector2((float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5f - (float)Main.itemTexture[drawPlayer.inventory[drawPlayer.selectedItem].type].Width * 0.5f * (float)drawPlayer.direction, 0f), drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); } else { int type3 = drawPlayer.inventory[drawPlayer.selectedItem].type; DrawData value3 = new DrawData(Main.itemTexture[type3], new Vector2((float)((int)(drawPlayer.itemLocation.X - Main.screenPosition.X)), (float)((int)(drawPlayer.itemLocation.Y - Main.screenPosition.Y))), new Rectangle?(new Rectangle(0, 0, Main.itemTexture[type3].Width, Main.itemTexture[type3].Height)), drawPlayer.inventory[drawPlayer.selectedItem].GetAlpha(newColor2), drawPlayer.itemRotation, new Vector2((float)Main.itemTexture[type3].Width * 0.5f - (float)Main.itemTexture[type3].Width * 0.5f * (float)drawPlayer.direction, (float)Main.itemTexture[type3].Height), drawPlayer.inventory[drawPlayer.selectedItem].scale, effect, 0); Main.playerDrawData.Add(value3); } } if (!flag6 && drawPlayer.front > 0 && drawPlayer.front < 5 && !drawPlayer.mount.Active) { DrawData value3 = new DrawData(Main.accFrontTexture[(int)drawPlayer.front], new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(drawPlayer.bodyFrame), color12, drawPlayer.bodyRotation, origin, 1f, spriteEffects, 0); value3.shader = num10; Main.playerDrawData.Add(value3); } if (drawPlayer.frozen) { Color color19 = color12; color19.R = (byte)((double)color19.R * 0.55); color19.G = (byte)((double)color19.G * 0.55); color19.B = (byte)((double)color19.B * 0.55); color19.A = (byte)((double)color19.A * 0.55); DrawData value3 = new DrawData(Main.frozenTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(new Rectangle(0, 0, Main.frozenTexture.Width, Main.frozenTexture.Height)), color19, drawPlayer.bodyRotation, new Vector2((float)(Main.frozenTexture.Width / 2), (float)(Main.frozenTexture.Height / 2)), 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } if (drawPlayer.iceBarrier && shadow == 0f) { int num69 = this.iceBarrierTexture.Height / 12; Color white = Color.White; DrawData value3 = new DrawData(this.iceBarrierTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X - (float)(drawPlayer.bodyFrame.Width / 2) + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - (float)drawPlayer.bodyFrame.Height + 4f))) + drawPlayer.bodyPosition + new Vector2((float)(drawPlayer.bodyFrame.Width / 2), (float)(drawPlayer.bodyFrame.Height / 2)), new Rectangle?(new Rectangle(0, num69 * (int)drawPlayer.iceBarrierFrame, this.iceBarrierTexture.Width, num69)), white, 0f, new Vector2((float)(Main.frozenTexture.Width / 2), (float)(Main.frozenTexture.Height / 2)), 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } if (drawPlayer.gem >= 0 && shadow == 0f) { DrawData value3 = new DrawData(Main.gemTexture[drawPlayer.gem], new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)drawPlayer.height - 80f))), new Rectangle?(new Rectangle(0, 0, Main.gemTexture[drawPlayer.gem].Width, Main.gemTexture[drawPlayer.gem].Height)), new Color(250, 250, 250, (int)(Main.mouseTextColor / 2)), 0f, new Vector2((float)(Main.gemTexture[drawPlayer.gem].Width / 2), (float)(Main.gemTexture[drawPlayer.gem].Height / 2)), (float)Main.mouseTextColor / 1000f + 0.8f, SpriteEffects.None, 0); Main.playerDrawData.Add(value3); } if (drawPlayer.beetleOffense || drawPlayer.beetleDefense) { for (int m = 0; m < drawPlayer.beetleOrbs; m++) { DrawData value3; for (int n = 0; n < 5; n++) { Color color20 = color12; float num70 = (float)n * 0.1f; num70 = 0.5f - num70; color20.R = (byte)((float)color20.R * num70); color20.G = (byte)((float)color20.G * num70); color20.B = (byte)((float)color20.B * num70); color20.A = (byte)((float)color20.A * num70); Vector2 value4 = -drawPlayer.beetleVel[m] * (float)n; value3 = new DrawData(Main.beetleTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2)))) + drawPlayer.beetlePos[m] + value4, new Rectangle?(new Rectangle(0, Main.beetleTexture.Height / 3 * drawPlayer.beetleFrame + 1, Main.beetleTexture.Width, Main.beetleTexture.Height / 3 - 2)), color20, 0f, new Vector2((float)(Main.beetleTexture.Width / 2), (float)(Main.beetleTexture.Height / 6)), 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } value3 = new DrawData(Main.beetleTexture, new Vector2((float)((int)(Position.X - Main.screenPosition.X + (float)(drawPlayer.width / 2))), (float)((int)(Position.Y - Main.screenPosition.Y + (float)(drawPlayer.height / 2)))) + drawPlayer.beetlePos[m], new Rectangle?(new Rectangle(0, Main.beetleTexture.Height / 3 * drawPlayer.beetleFrame + 1, Main.beetleTexture.Width, Main.beetleTexture.Height / 3 - 2)), color12, 0f, new Vector2((float)(Main.beetleTexture.Width / 2), (float)(Main.beetleTexture.Height / 6)), 1f, spriteEffects, 0); Main.playerDrawData.Add(value3); } } if (rotation != 0f) { Vector2 value5 = Position - Main.screenPosition + rotationOrigin; Vector2 value6 = drawPlayer.position + rotationOrigin; Matrix matrix = Matrix.CreateRotationZ(rotation); for (int num71 = 0; num71 < Main.playerDrawDust.Count; num71++) { Vector2 vector9 = Main.dust[Main.playerDrawDust[num71]].position - value6; vector9 = Vector2.Transform(vector9, matrix); Main.dust[Main.playerDrawDust[num71]].position = vector9 + value6; } for (int num72 = 0; num72 < Main.playerDrawGore.Count; num72++) { Vector2 vector10 = Main.gore[Main.playerDrawGore[num72]].position - value6; vector10 = Vector2.Transform(vector10, matrix); Main.gore[Main.playerDrawGore[num72]].position = vector10 + value6; } for (int num73 = 0; num73 < Main.playerDrawData.Count; num73++) { DrawData value3 = Main.playerDrawData[num73]; Vector2 vector11 = value3.position - value5; vector11 = Vector2.Transform(vector11, matrix); value3.position = vector11 + value5; value3.rotation += rotation; Main.playerDrawData[num73] = value3; } } int num74 = -1; for (int num75 = 0; num75 < Main.playerDrawData.Count; num75++) { if (num == num75) { if (num74 != 0) { Main.pixelShader.CurrentTechnique.Passes[0].Apply(); num74 = 0; } Main.projectile[drawPlayer.heldProj].gfxOffY = drawPlayer.gfxOffY; this.DrawProj(drawPlayer.heldProj); } DrawData value3 = Main.playerDrawData[num75]; if (num74 != value3.shader) { Main.pixelShader.CurrentTechnique.Passes[value3.shader].Apply(); } value3.Draw(Main.spriteBatch); } Main.pixelShader.CurrentTechnique.Passes[0].Apply(); drawPlayer.itemLocation.Y = drawPlayer.itemLocation.Y - drawPlayer.gfxOffY; }
public override void DrawArmorColor(Player drawPlayer, float shadow, ref Color color, ref int glowMask, ref Color glowMaskColor) { color = drawPlayer.GetImmuneAlphaPure(Color.White, shadow); }