Even More Modifiers
1.0.0.0
A mod for rolling various bonus stats on items
Main Page
Related Pages
Packages
Classes
Files
File List
File Members
LootEsseneGlobalNPC.cs
Go to the documentation of this file.
1
using
Terraria
;
2
using
Terraria
.ModLoader;
3
4
namespace
Loot
.Soulforging
5
{
6
internal
class
LootEsseneGlobalNPC :
GlobalNPC
7
{
8
public
override
void
NPCLoot(NPC npc)
9
{
10
var player = Main.LocalPlayer.GetModPlayer<LootEssencePlayer>();
11
if
(!ModContent.GetInstance<LootEssenceWorld>().SoulforgingUnlocked)
return
;
12
13
// TODO did this player kill the npc though? is the player close enough?
14
player.KillCount++;
15
16
if
(npc.boss)
17
{
18
player.GainEssence(10);
19
}
20
21
if
(player.KillCount >= 9)
22
{
23
player.KillCount = 0;
24
player.GainEssence(1);
25
}
26
}
27
}
28
}
Loot
Terraria
GlobalNPC
Soulforging
LootEsseneGlobalNPC.cs
Generated on Sat Apr 18 2020 16:45:40 for Even More Modifiers by
1.8.11