tModLoader i need help with inflicting debuff/buffs

so umm i need help how do I make weapons and amors inflict debuffs i want both of them to inflict On Fire but for the armor as a set bonus I would appreciate the help!
edit: please don't tell me to go into the example mod in github I am using that for reference i just am having problems.
 
For weapons it's simple. See below. I'm not sure what you mean about the armor though.

Code:
        public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) {
            target.AddBuff(BuffID.OnFire, 60);
        }
 
For weapons it's simple. See below. I'm not sure what you mean about the armor though.

Code:
        public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit) {
            target.AddBuff(BuffID.OnFire, 60);
        }
Oh wow…. That simple and I had it but with an extra line oops lol
Well thanks!
 
Back
Top Bottom