This commit is contained in:
Andrew Marheine committed 2021-08-10 03:44:22 -05:00
commit ff362f5c51
2 files changed
+634 -465

No files matched your search

+634 -449
View File
File diff suppressed because it is too large. Load diff
-16
View File
@@ -2,7 +2,6 @@ using CalamityMod.Items.Weapons.Rogue;
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Prefixes
@@ -90,21 +89,6 @@ namespace CalamityMod.Prefixes
mod.AddPrefix(name, new RoguePrefix(damageMult, useTimeMult, critBonus, shootSpeedMult, stealthDmgMult));
RogueModifiers.Add(mod.GetPrefix(name).Type);
}
public override void ValidateItem(Item item, ref bool invalid)
{
if (item.damage == Math.Round(item.damage * damageMult) && damageMult != 1f)
invalid = true;
if (item.useAnimation == Math.Round(item.useAnimation * useTimeMult) && useTimeMult != 1f)
invalid = true;
// This code is commented out because CanRoll already guarantees that rogue prefixes will never appear on consumable items.
// Setting invalid to true doesn't do anything good.
// It just makes prefixed consumable rogue weapons put TML in an infinite loop looking for an appropriate prefix.
/*
if (item.consumable)
invalid = true;
*/
}
}
public enum RoguePrefixType : byte