Merge branch 'master' of https://github.com/CalamityTeam/CalamityMod
This commit is contained in:
commit
ff362f5c51
2 files changed
+634
-465
No files matched your search
+634
-449
File diff suppressed because it is too large.
Load diff
@@ -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
|
||||
|
||||
Reference in new issue
Block a user