diff --git a/Content/Items/Misc/Souls/SoulofSpite.cs b/Content/Items/Misc/Souls/SoulofSpite.cs index 34d0d6d..543838a 100644 --- a/Content/Items/Misc/Souls/SoulofSpite.cs +++ b/Content/Items/Misc/Souls/SoulofSpite.cs @@ -3,6 +3,7 @@ using Decimation.Lib.Util; using Terraria; using Terraria.DataStructures; using Terraria.ID; +using Terraria.ModLoader; namespace Decimation.Content.Items.Misc.Souls { @@ -24,17 +25,16 @@ namespace Decimation.Content.Items.Misc.Souls ItemID.Sets.ItemIconPulse[item.type] = true; ItemID.Sets.ItemNoGravity[item.type] = true; } + } - // Uncomment when Slime Prince will be done - /**public class SoulGlobalNPC : GlobalNPC + internal class SoulofSpiteNpcEffect : GlobalNPC + { + public override void NPCLoot(NPC npc) { - public override void NPCLoot(NPC npc) - { - if (npc.type == mod.NPCType()) - { - Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType(), Main.rand.Next(12, 25)); - } - } - }**/ + if (Main.LocalPlayer.ZoneUnderworldHeight && + (!Main.expertMode && Main.rand.NextBool(5) || Main.expertMode && Main.rand.NextBool(9, 26))) + Item.NewItem((int) npc.position.X, (int) npc.position.Y, npc.width, npc.height, + ModContent.ItemType()); + } } } \ No newline at end of file