Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
GetNPCColorTintedByBuffs()
Color
Terraria.NPC.GetNPCColorTintedByBuffs
(
Color
npcColor
)
inline
Definition at line
87779
of file
NPC.cs
.
87780
{
87781
if
(!
canDisplayBuffs
)
87782
{
87783
return
npcColor
;
87784
}
87785
float
num = 1f;
87786
float
num2
= 1f;
87787
float
num3
= 1f;
87788
float
a
= 1f;
87789
if
(
poisoned
)
87790
{
87791
num *= 0.65f;
87792
num3
*= 0.75f;
87793
npcColor
=
buffColor
(
npcColor
, num,
num2
,
num3
,
a
);
87794
}
87795
if
(
venom
)
87796
{
87797
num2
*= 0.45f;
87798
num *= 0.75f;
87799
npcColor
=
buffColor
(
npcColor
, num,
num2
,
num3
,
a
);
87800
}
87801
if
(
midas
)
87802
{
87803
num3
*= 0.3f;
87804
num *= 0.85f;
87805
npcColor
=
buffColor
(
npcColor
, num,
num2
,
num3
,
a
);
87806
}
87807
if
(
betsysCurse
)
87808
{
87809
num *= 0.8f;
87810
num2
*= 0.6f;
87811
npcColor
=
buffColor
(
npcColor
, num,
num2
,
num3
,
a
);
87812
}
87813
if
(
oiled
)
87814
{
87815
num *= 0.4f;
87816
num2
*= 0.4f;
87817
num3
*= 0.4f;
87818
npcColor
=
buffColor
(
npcColor
, num,
num2
,
num3
,
a
);
87819
}
87820
if
(
stinky
)
87821
{
87822
num *= 0.7f;
87823
num3
*= 0.55f;
87824
npcColor
=
buffColor
(
npcColor
, num,
num2
,
num3
,
a
);
87825
}
87826
if
(
drippingSlime
)
87827
{
87828
num *= 0.8f;
87829
num2
*= 0.8f;
87830
npcColor
=
buffColor
(
npcColor
, num,
num2
,
num3
,
a
);
87831
}
87832
if
(
drippingSparkleSlime
)
87833
{
87834
num3
*= 0.85f;
87835
num2
*= 0.75f;
87836
npcColor
=
buffColor
(
npcColor
, num,
num2
,
num3
,
a
);
87837
}
87838
if
(
ichor
)
87839
{
87840
npcColor
=
new
Color
(255, 255, 0, 255);
87841
}
87842
if
(
CanApplyHunterPotionEffects
() &&
lifeMax
> 1)
87843
{
87844
byte
b
;
87845
byte
b2
;
87846
byte
b3
;
87847
if
(
friendly
||
catchItem
> 0 || (
damage
== 0 &&
lifeMax
== 5))
87848
{
87849
b
= 50;
87850
b2
=
byte
.MaxValue;
87851
b3
= 50;
87852
}
87853
else
87854
{
87855
b
=
byte
.MaxValue;
87856
b2
= 50;
87857
b3
= 50;
87858
}
87859
if
(
npcColor
.R <
b
)
87860
{
87861
npcColor.R =
b
;
87862
}
87863
if
(
npcColor
.G <
b2
)
87864
{
87865
npcColor.G =
b2
;
87866
}
87867
if
(
npcColor
.B <
b3
)
87868
{
87869
npcColor.B =
b3
;
87870
}
87871
}
87872
return
npcColor
;
87873
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
Terraria.NPC.drippingSparkleSlime
bool drippingSparkleSlime
Definition
NPC.cs:93
Terraria.NPC.damage
int damage
Definition
NPC.cs:461
Terraria.NPC.venom
bool venom
Definition
NPC.cs:239
Terraria.NPC.stinky
bool stinky
Definition
NPC.cs:257
Terraria.NPC.poisoned
bool poisoned
Definition
NPC.cs:235
Terraria.NPC.lifeMax
int lifeMax
Definition
NPC.cs:479
Terraria.NPC.CanApplyHunterPotionEffects
bool CanApplyHunterPotionEffects()
Definition
NPC.cs:87774
Terraria.NPC.ichor
bool ichor
Definition
NPC.cs:223
Terraria.NPC.canDisplayBuffs
bool canDisplayBuffs
Definition
NPC.cs:219
Terraria.NPC.oiled
bool oiled
Definition
NPC.cs:283
Terraria.NPC.midas
bool midas
Definition
NPC.cs:221
Terraria.NPC.friendly
bool friendly
Definition
NPC.cs:555
Terraria.NPC.betsysCurse
bool betsysCurse
Definition
NPC.cs:281
Terraria.NPC.buffColor
static Color buffColor(Color newColor, float R, float G, float B, float A)
Definition
NPC.cs:87765
Terraria.NPC.drippingSlime
bool drippingSlime
Definition
NPC.cs:91
Terraria.NPC.catchItem
short catchItem
Definition
NPC.cs:105
Microsoft.Xna.Framework.Graphics.SurfaceFormat.Color
@ Color
References
Microsoft.Xna.Framework.Graphics.Color
.
Terraria
NPC
Generated by
1.10.0