public void Progress(int progress, Item item, HiddenPotentialAffix affix) { this.progress += progress; if (this.progress >= required) { affix.OnRequirementDone(item); } }
public override string GetTooltip(Item item, HiddenPotentialAffix affix) { string formatted = "{name}: {progress}/{required}"; formatted = formatted.Replace("{name}", GetRequirementTooltipName(item, affix)); formatted = formatted.Replace("{progress}", progress.ToString()); formatted = formatted.Replace("{required}", required.ToString()); return(formatted); }
public abstract string GetRequirementTooltipName(Item item, HiddenPotentialAffix affix);
public virtual void OnHitNPC(Item item, Player player, Projectile projectile, NPC target, int damage, float knockBack, bool crit, HiddenPotentialAffix affix) { }
public abstract string GetTooltip(Item item, HiddenPotentialAffix affix);
public virtual void OnNPCKilled(NPC npc, Player player, Item item, HiddenPotentialAffix affix) { Progress(1, item, affix); }
public override string GetRequirementTooltipName(Item item, HiddenPotentialAffix affix) { return("Kills"); }
public override void OnHitNPC(Item item, Player player, Projectile projectile, NPC target, int damage, float knockBack, bool crit, HiddenPotentialAffix affix) { Progress(1, item, affix); }