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

◆ GetColor()

Color Terraria.NPC.GetColor ( Color newColor)
inline

Definition at line 110986 of file NPC.cs.

110987 {
110988 //IL_0009: Unknown result type (might be due to invalid IL or missing references)
110989 //IL_000e: Unknown result type (might be due to invalid IL or missing references)
110990 //IL_0125: Unknown result type (might be due to invalid IL or missing references)
110992 {
110994 }
110995 int num = ((Color)(ref color)).R - (255 - ((Color)(ref newColor)).R);
110996 int num2 = ((Color)(ref color)).G - (255 - ((Color)(ref newColor)).G);
110997 int num3 = ((Color)(ref color)).B - (255 - ((Color)(ref newColor)).B);
110998 int num4 = ((Color)(ref color)).A - (255 - ((Color)(ref newColor)).A);
110999 if (num < 0)
111000 {
111001 num = 0;
111002 }
111003 if (num > 255)
111004 {
111005 num = 255;
111006 }
111007 if (num2 < 0)
111008 {
111009 num2 = 0;
111010 }
111011 if (num2 > 255)
111012 {
111013 num2 = 255;
111014 }
111015 if (num3 < 0)
111016 {
111017 num3 = 0;
111018 }
111019 if (num3 > 255)
111020 {
111021 num3 = 255;
111022 }
111023 if (num4 < 0)
111024 {
111025 num4 = 0;
111026 }
111027 if (num4 > 255)
111028 {
111029 num4 = 255;
111030 }
111032 {
111033 num = (byte)((float)num * (1f - shimmerTransparency));
111034 num2 = (byte)((float)num2 * (1f - shimmerTransparency));
111035 num3 = (byte)((float)num3 * (1f - shimmerTransparency));
111036 num4 = (byte)((float)num4 * (1f - shimmerTransparency));
111037 }
111038 return new Color(num, num2, num3, num4);
111039 }
bool CanApplyHunterPotionEffects()
Definition NPC.cs:107881
Color color
Definition NPC.cs:1085
Color GetBestiaryEntryColor()
Definition NPC.cs:110640
float shimmerTransparency
Definition NPC.cs:643
bool IsABestiaryIconDummy
Definition NPC.cs:432