fix miracle blight crashing vanilla bosses whoops
This commit is contained in:
1 parent
74753c5312
commit
188fa06a99
1 file changed
+2
-1
@@ -5647,7 +5647,8 @@ namespace CalamityMod.NPCs
|
||||
VulnerabilityHexFireDrawer = null;
|
||||
|
||||
// Miracle Blight will not attempt to use its shader on bosses from other mods. It still works on vanilla bosses.
|
||||
bool otherModBoss = npc.IsABoss() && npc.ModNPC.Mod is not null && npc.ModNPC.Mod != CalamityMod.Instance;
|
||||
Mod sourceMod = npc.ModNPC?.Mod ?? null;
|
||||
bool otherModBoss = npc.IsABoss() && sourceMod != CalamityMod.Instance;
|
||||
// Setting the NPC immune to Miracle Blight also makes the shader immediately disappear.
|
||||
bool useMiracleBlightShader = !npc.buffImmune[BuffType<MiracleBlight>()] && !otherModBoss;
|
||||
if (useMiracleBlightShader && npc.Calamity().miracleBlight > 0)
|
||||
|
||||
Reference in new issue
Block a user