Title says it all really, but heres a bit more detail, Code:
public override int NPCShader(NPC npc, SpriteBatch spriteBatch, Color drawColor)
{
if (npc.townNPC)
return base.NPCShader(npc, spriteBatch, drawColor);
var gnpc = npc.GetGlobalNPC();
bool hasFoulSpirit = gnpc.DoT_Handler.Any(x => x.Type == ModContent.BuffType<FoulSpiritDebuff>());
if (hasFoulSpirit)
return 114;
if (npc.HasBuff(ModContent.BuffType<NecroPoisonDebuff>()))
return 67;
return base.NPCShader(npc, spriteBatch, drawColor);
}
Will cause my mod town NPC's to be affected by the same shader. I've checked to see if(npc.townNPC) is hit, it is. Shaders are still being applied to the wrong NPC.