PankHairStudios
Skeletron Prime
I've already fixed those errors, but now im getting this error about a Zone:
EDIT: it was relplaced with ZoneSkyHeight
Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Trelamium.NPCs
{
public class ModGlobalNPC : GlobalNPC
{
public override void NPCLoot(NPC npc)
{
if (Main.player[Main.myPlayer].ZoneBeach)
{
if (Main.rand.Next(10) == 0)
{
Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("SeaEssence"));
}
}
if (Main.player[Main.myPlayer].GetModPlayer<MyPlayer>(mod).ZoneDForest)
{
if (Main.rand.Next(10) == 0)
{
Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("NatureEssence"));
}
}
if (Main.player[Main.myPlayer].GetModPlayer<MyPlayer>(mod).ZoneDForest)
{
if (Main.rand.Next(90) == 0)
{
Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("ForestKey"));
}
}
if (Main.player[Main.myPlayer].ZoneSandstorm)
{
if (Main.rand.Next(8) == 0)
{
Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("FearlessWindEssence"));
}
}
if (Main.player[Main.myPlayer].ZoneTowerVortex)
{
if (Main.rand.Next(20) == 0)
{
Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.FragmentVortex);
}
}
if (Main.player[Main.myPlayer].ZoneTowerSolar)
{
if (Main.rand.Next(20) == 0)
{
Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.FragmentSolar);
}
}
if (Main.player[Main.myPlayer].ZoneTowerNebula)
{
if (Main.rand.Next(20) == 0)
{
Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.FragmentNebula);
}
}
if (Main.player[Main.myPlayer].ZoneTowerStardust)
{
if (Main.rand.Next(20) == 0)
{
Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.FragmentStardust);
}
}
if (Main.player[Main.myPlayer].ZoneSpace)
{
if (Main.rand.Next(6) == 0)
{
Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EssenceOfFlight"));
}
}
}
}
}
EDIT: it was relplaced with ZoneSkyHeight