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

◆ GetProjectileDesiredShader()

static int Terraria.Main.GetProjectileDesiredShader ( Projectile proj)
inlinestatic

Definition at line 21791 of file Main.cs.

21792 {
21793 int result = 0;
21794 if (proj.minion && proj.owner != 255)
21795 {
21796 result = player[proj.owner].cMinion;
21797 }
21798 if (projHook[proj.type] && proj.owner != 255)
21799 {
21800 result = player[proj.owner].cGrapple;
21801 }
21802 if (projPet[proj.type] && !proj.minion && proj.owner != 255 && proj.damage == 0 && !ProjectileID.Sets.LightPet[proj.type])
21803 {
21804 result = player[proj.owner].cPet;
21805 }
21806 if (!proj.minion && proj.owner != 255 && proj.damage == 0 && ProjectileID.Sets.LightPet[proj.type])
21807 {
21808 result = player[proj.owner].cLight;
21809 }
21810 if (proj.owner != 255)
21811 {
21812 switch (proj.type)
21813 {
21814 case 623:
21815 case 1020:
21816 result = player[proj.owner].cPet;
21817 break;
21818 case 818:
21819 result = player[proj.owner].cMinion;
21820 break;
21821 }
21822 }
21823 return result;
21824 }
static bool[] LightPet
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile is a light pet...
static bool[] projPet
Definition Main.cs:1425
static Player[] player
Definition Main.cs:1960
static bool[] projHook
Definition Main.cs:804

References Terraria.ID.ProjectileID.Sets.LightPet, Terraria.Main.player, Terraria.Main.projHook, and Terraria.Main.projPet.

Referenced by Terraria.Main.PrepareDrawnProjectileDrawing().

+ Here is the caller graph for this function: