-
Notifications
You must be signed in to change notification settings - Fork 0
/
PrimeNPC.cs
41 lines (35 loc) · 992 Bytes
/
PrimeNPC.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
using System.Collections.Generic;
using Prime.Items.Misc;
using Prime.Items.Tools;
using Prime.Items.Weapons;
using Prime.Utilities;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Prime
{
public class PrimeNPC : GlobalNPC
{
public override void NPCLoot(NPC npc)
{
NpcHelper.DropItemWithProbability(npc.getRect(), ModContent.ItemType<TimewarpTonic>(), 1, 0.005);
base.NPCLoot(npc);
}
public static bool AnyBossNPCs()
{
for (var i = 0; i < 200; ++i)
{
if (Main.npc[i].active && Main.npc[i].boss)
return true;
}
return false;
}
public override void EditSpawnRate(Player player, ref int spawnRate, ref int maxSpawns)
{
if (!player.GetPrimePlayer().bossZen) return;
spawnRate = 0;
maxSpawns = 0;
}
}
}