TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ GetFairyQueenWeaponsColor()

Color Terraria.Projectile.GetFairyQueenWeaponsColor ( float alphaChannelMultiplier = 1f,
float lerpToWhite = 0f,
float? rawHueOverride = null )
inline

Definition at line 20478 of file Projectile.cs.

20479 {
20480 //IL_0def: Unknown result type (might be due to invalid IL or missing references)
20481 //IL_0df4: Unknown result type (might be due to invalid IL or missing references)
20482 //IL_0df6: Unknown result type (might be due to invalid IL or missing references)
20483 //IL_0dfe: Unknown result type (might be due to invalid IL or missing references)
20484 //IL_0e03: Unknown result type (might be due to invalid IL or missing references)
20485 //IL_0e2e: Unknown result type (might be due to invalid IL or missing references)
20486 //IL_0e0d: Unknown result type (might be due to invalid IL or missing references)
20487 //IL_0e0f: Unknown result type (might be due to invalid IL or missing references)
20488 //IL_0e15: Unknown result type (might be due to invalid IL or missing references)
20489 //IL_0e1a: Unknown result type (might be due to invalid IL or missing references)
20490 //IL_0cf1: Unknown result type (might be due to invalid IL or missing references)
20491 //IL_0cf6: Unknown result type (might be due to invalid IL or missing references)
20492 //IL_0cfd: Unknown result type (might be due to invalid IL or missing references)
20493 //IL_0d02: Unknown result type (might be due to invalid IL or missing references)
20494 //IL_08a6: Unknown result type (might be due to invalid IL or missing references)
20495 //IL_08ba: Unknown result type (might be due to invalid IL or missing references)
20496 //IL_08c1: Unknown result type (might be due to invalid IL or missing references)
20497 //IL_08c6: Unknown result type (might be due to invalid IL or missing references)
20498 //IL_0d2d: Unknown result type (might be due to invalid IL or missing references)
20499 //IL_0d0c: Unknown result type (might be due to invalid IL or missing references)
20500 //IL_0d0e: Unknown result type (might be due to invalid IL or missing references)
20501 //IL_0d14: Unknown result type (might be due to invalid IL or missing references)
20502 //IL_0d19: Unknown result type (might be due to invalid IL or missing references)
20503 //IL_066d: Unknown result type (might be due to invalid IL or missing references)
20504 //IL_0672: Unknown result type (might be due to invalid IL or missing references)
20505 //IL_0679: Unknown result type (might be due to invalid IL or missing references)
20506 //IL_067e: Unknown result type (might be due to invalid IL or missing references)
20507 //IL_08f1: Unknown result type (might be due to invalid IL or missing references)
20508 //IL_08d0: Unknown result type (might be due to invalid IL or missing references)
20509 //IL_08d2: Unknown result type (might be due to invalid IL or missing references)
20510 //IL_08d8: Unknown result type (might be due to invalid IL or missing references)
20511 //IL_08dd: Unknown result type (might be due to invalid IL or missing references)
20512 //IL_06a9: Unknown result type (might be due to invalid IL or missing references)
20513 //IL_0688: Unknown result type (might be due to invalid IL or missing references)
20514 //IL_068a: Unknown result type (might be due to invalid IL or missing references)
20515 //IL_0690: Unknown result type (might be due to invalid IL or missing references)
20516 //IL_0695: Unknown result type (might be due to invalid IL or missing references)
20517 float num = ai[1];
20518 if (rawHueOverride.HasValue)
20519 {
20520 num = rawHueOverride.Value;
20521 }
20522 float num2 = (num + 0.5f) % 1f;
20523 float saturation = 1f;
20524 float luminosity = 0.5f;
20525 if (Main.player[owner].active)
20526 {
20527 switch (Main.player[owner].name)
20528 {
20529 case "Cenx":
20530 {
20531 float amount5 = Utils.PingPongFrom01To010(num2);
20532 amount5 = MathHelper.SmoothStep(0f, 1f, amount5);
20533 amount5 = MathHelper.SmoothStep(0f, 1f, amount5);
20534 Color color3 = Color.Lerp(new Color(0.3f, 1f, 0.2f), Color.HotPink, amount5);
20535 if (lerpToWhite != 0f)
20536 {
20537 color3 = Color.Lerp(color3, Color.White, lerpToWhite);
20538 }
20539 ((Color)(ref color3)).A = (byte)((float)(int)((Color)(ref color3)).A * alphaChannelMultiplier);
20540 return color3;
20541 }
20542 case "Crowno":
20543 luminosity = MathHelper.Lerp(0.25f, 0.4f, Utils.Turn01ToCyclic010(num2));
20544 num2 = MathHelper.Lerp(127f / 180f, 47f / 60f, Utils.Turn01ToCyclic010(num2));
20546 break;
20547 case "Yoraiz0r":
20548 num2 = MathHelper.Lerp(0.9f, 0.95f, Utils.Turn01ToCyclic010(num2));
20549 luminosity = 0.5f;
20550 break;
20551 case "Jaxrud":
20552 num2 = MathHelper.Lerp(13f / 72f, 0.43611112f, Utils.Turn01ToCyclic010(num2));
20553 luminosity = 0.5f;
20554 break;
20555 case "Lazure":
20556 num2 = MathHelper.Lerp(8f / 15f, 83f / 90f, Utils.Turn01ToCyclic010(num2));
20557 luminosity = 0.5f;
20558 break;
20559 case "Leinfors":
20560 num2 = MathHelper.Lerp(0.7f, 0.77f, Utils.Turn01ToCyclic010(num2));
20561 luminosity = 0.5f;
20562 break;
20563 case "Grox The Great":
20564 num2 = MathHelper.Lerp(0.31f, 0.5f, Utils.Turn01ToCyclic010(num2));
20565 luminosity = 0.5f;
20567 break;
20568 case "Acamaeda":
20569 num2 = MathHelper.Lerp(0.06f, 0.28f, Utils.Turn01ToCyclic010(num2));
20570 luminosity = 0.5f;
20572 break;
20573 case "Alchemystics":
20574 num2 = MathHelper.Lerp(0.74f, 0.96f, Utils.Turn01ToCyclic010(num2));
20575 luminosity = 0.6f;
20577 break;
20578 case "Antithesis":
20579 {
20580 num2 = 0.51f;
20581 float amount6 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20582 luminosity = MathHelper.Lerp(0f, 0.5f, amount6);
20583 break;
20584 }
20585 case "Aurora3500":
20586 num2 = MathHelper.Lerp(0.33f, 0.8f, Utils.Turn01ToCyclic010(num2));
20587 luminosity = 0.5f;
20589 break;
20590 case "Bame":
20591 {
20592 float amount4 = Utils.PingPongFrom01To010(num2);
20593 amount4 = MathHelper.SmoothStep(0f, 1f, amount4);
20594 amount4 = MathHelper.SmoothStep(0f, 1f, amount4);
20595 Color color2 = Color.Lerp(Color.Yellow, new Color(0.4f, 0f, 0.75f), amount4);
20596 if (lerpToWhite != 0f)
20597 {
20598 color2 = Color.Lerp(color2, Color.White, lerpToWhite);
20599 }
20600 ((Color)(ref color2)).A = (byte)((float)(int)((Color)(ref color2)).A * alphaChannelMultiplier);
20601 return color2;
20602 }
20603 case "Criddle":
20604 num2 = MathHelper.Lerp(0.05f, 0.15f, Utils.Turn01ToCyclic010(num2));
20605 luminosity = 0.5f;
20607 break;
20608 case "Darthkitten":
20609 {
20610 num2 = 1f;
20611 float amount3 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20612 luminosity = MathHelper.Lerp(1f, 0.4f, amount3);
20613 break;
20614 }
20615 case "darthmorf":
20616 {
20617 num2 = 0f;
20618 float amount2 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20619 luminosity = MathHelper.Lerp(0f, 0.2f, amount2);
20620 break;
20621 }
20622 case "Discipile":
20623 {
20624 num2 = 0.53f;
20625 float amount14 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20626 luminosity = MathHelper.Lerp(0.05f, 0.5f, amount14);
20627 break;
20628 }
20629 case "Doylee":
20630 num2 = MathHelper.Lerp(0.68f, 1f, Utils.Turn01ToCyclic010(num2));
20631 luminosity = 0.5f;
20633 break;
20634 case "Ghostar":
20635 {
20636 num2 = 0.66f;
20637 float amount13 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20638 luminosity = MathHelper.Lerp(0.15f, 0.85f, amount13);
20639 break;
20640 }
20641 case "Jenosis":
20642 num2 = MathHelper.Lerp(0.9f, 1.13f, Utils.Turn01ToCyclic010(num2)) % 1f;
20643 luminosity = 0.5f;
20645 break;
20646 case "Kazzymodus":
20647 {
20648 num2 = 0.33f;
20649 float amount12 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20650 luminosity = MathHelper.Lerp(0.15f, 0.4f, amount12);
20651 break;
20652 }
20653 case "Khaios":
20654 {
20655 num2 = 0.33f;
20656 float amount11 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20657 luminosity = MathHelper.Lerp(0f, 0.2f, amount11);
20658 break;
20659 }
20660 case "Loki":
20661 {
20662 num2 = 0f;
20663 float amount10 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20664 luminosity = MathHelper.Lerp(0f, 0.25f, amount10);
20665 break;
20666 }
20667 case "ManaUser":
20668 num2 = MathHelper.Lerp(0.41f, 0.57f, Utils.Turn01ToCyclic010(num2));
20669 luminosity = 0.5f;
20670 break;
20671 case "Mid":
20672 {
20673 num2 = 0f;
20674 float amount9 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20675 luminosity = MathHelper.Lerp(0f, 0.9f, amount9);
20676 break;
20677 }
20678 case "Nimbus":
20679 num2 = MathHelper.Lerp(0.75f, 1f, Utils.Turn01ToCyclic010(num2));
20680 luminosity = 1f;
20682 break;
20683 case "Nike Leon":
20684 num2 = MathHelper.Lerp(0.04f, 0.1f, Utils.Turn01ToCyclic010(num2));
20685 luminosity = 0.5f;
20687 break;
20688 case "ppowersteef":
20689 num2 = MathHelper.Lerp(0f, 0.15f, Utils.Turn01ToCyclic010(num2));
20690 luminosity = 0.5f;
20692 break;
20693 case "RBrandon":
20694 num2 = 0.03f;
20695 luminosity = 0.3f;
20697 break;
20698 case "Redigit":
20699 num2 = 0.7f;
20700 luminosity = 0.5f;
20701 break;
20702 case "Serenity":
20703 {
20704 num2 = 0.85f;
20705 float amount8 = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20706 luminosity = MathHelper.Lerp(1f, 0.5f, amount8);
20707 break;
20708 }
20709 case "Sigma":
20710 num2 = MathHelper.Lerp(0f, 0.12f, Utils.Turn01ToCyclic010(num2));
20711 luminosity = 0.5f;
20713 break;
20714 case "teiull":
20715 num2 = MathHelper.Lerp(0.66f, 1f, Utils.Turn01ToCyclic010(num2));
20716 luminosity = 0.5f;
20717 break;
20718 case "Unit One":
20719 {
20720 float amount7 = Utils.PingPongFrom01To010(num2);
20721 amount7 = MathHelper.SmoothStep(0f, 1f, amount7);
20722 Color color = Color.Lerp(Color.Yellow, Color.Blue, amount7);
20723 if (lerpToWhite != 0f)
20724 {
20725 color = Color.Lerp(color, Color.White, lerpToWhite);
20726 }
20727 ((Color)(ref color)).A = (byte)((float)(int)((Color)(ref color)).A * alphaChannelMultiplier);
20728 return color;
20729 }
20730 case "Vulpes Inculta":
20731 num2 = MathHelper.Lerp(0.65f, 0.75f, Utils.Turn01ToCyclic010(num2));
20732 luminosity = 0.5f;
20734 break;
20735 case "Waze3174":
20736 num2 = MathHelper.Lerp(0.33f, 0f, Utils.Turn01ToCyclic010(num2));
20737 luminosity = 0.3f;
20739 break;
20740 case "Xman101":
20741 {
20742 num2 = 0.06f;
20743 float amount = (float)Math.Cos(num * ((float)Math.PI * 2f)) * 0.5f + 0.5f;
20744 luminosity = MathHelper.Lerp(0f, 0.5f, amount);
20745 break;
20746 }
20747 case "Zoomo":
20748 num2 = 0.77f;
20749 luminosity = 0.5f;
20751 break;
20752 }
20753 }
20754 Color color4 = Main.hslToRgb(num2, saturation, luminosity);
20755 color4 *= Opacity;
20756 if (lerpToWhite != 0f)
20757 {
20758 color4 = Color.Lerp(color4, Color.White, lerpToWhite);
20759 }
20760 ((Color)(ref color4)).A = (byte)((float)(int)((Color)(ref color4)).A * alphaChannelMultiplier);
20761 return color4;
20762 }
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....

References Terraria.Projectile.ai, Terraria.Main.hslToRgb(), Terraria.Projectile.Opacity, Terraria.Projectile.owner, Terraria.Utils.PingPongFrom01To010(), Terraria.Main.player, and Terraria.Utils.Turn01ToCyclic010().

+ Here is the call graph for this function: