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

◆ GetProjectileDesiredShader()

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

Definition at line 20718 of file Main.cs.

20719 {
20720 int result = 0;
20721 if (proj.minion && proj.owner != 255)
20722 {
20723 result = player[proj.owner].cMinion;
20724 }
20725 if (projHook[proj.type] && proj.owner != 255)
20726 {
20727 result = player[proj.owner].cGrapple;
20728 }
20729 if (projPet[proj.type] && !proj.minion && proj.owner != 255 && proj.damage == 0 && !ProjectileID.Sets.LightPet[proj.type])
20730 {
20731 result = player[proj.owner].cPet;
20732 }
20733 if (!proj.minion && proj.owner != 255 && proj.damage == 0 && ProjectileID.Sets.LightPet[proj.type])
20734 {
20735 result = player[proj.owner].cLight;
20736 }
20737 if (proj.owner != 255)
20738 {
20739 switch (proj.type)
20740 {
20741 case 623:
20742 case 1020:
20743 result = player[proj.owner].cPet;
20744 break;
20745 case 818:
20746 result = player[proj.owner].cMinion;
20747 break;
20748 }
20749 }
20750 return result;
20751 }
static bool[] projPet
Definition Main.cs:1328
static Player[] player
Definition Main.cs:1803
static bool[] projHook
Definition Main.cs:772

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

Referenced by Terraria.Main.PrepareDrawnProjectileDrawing().