summaryrefslogtreecommitdiff
path: root/TrainerMod
diff options
context:
space:
mode:
Diffstat (limited to 'TrainerMod')
-rw-r--r--TrainerMod/TrainerMod.cs5
-rw-r--r--TrainerMod/bin/Debug/TrainerMod.dllbin23040 -> 23040 bytes
-rw-r--r--TrainerMod/obj/Debug/TrainerMod.dllbin23040 -> 23040 bytes
3 files changed, 5 insertions, 0 deletions
diff --git a/TrainerMod/TrainerMod.cs b/TrainerMod/TrainerMod.cs
index 250ccab5..a9896aac 100644
--- a/TrainerMod/TrainerMod.cs
+++ b/TrainerMod/TrainerMod.cs
@@ -46,6 +46,9 @@ namespace TrainerMod
static void Events_UpdateTick()
{
+ if (Game1.player == null)
+ return;
+
if (infHealth)
{
Game1.player.health = Game1.player.maxHealth;
@@ -756,6 +759,8 @@ namespace TrainerMod
static void RegisterNewItem(Command cmd)
{
+ if (!Program.debug)
+ return;
SObject s = SGame.PullModItemFromDict(0, true);
s.Stack = 999;
Game1.player.addItemToInventory(s);
diff --git a/TrainerMod/bin/Debug/TrainerMod.dll b/TrainerMod/bin/Debug/TrainerMod.dll
index 4552ec76..2ca9ad54 100644
--- a/TrainerMod/bin/Debug/TrainerMod.dll
+++ b/TrainerMod/bin/Debug/TrainerMod.dll
Binary files differ
diff --git a/TrainerMod/obj/Debug/TrainerMod.dll b/TrainerMod/obj/Debug/TrainerMod.dll
index 4552ec76..2ca9ad54 100644
--- a/TrainerMod/obj/Debug/TrainerMod.dll
+++ b/TrainerMod/obj/Debug/TrainerMod.dll
Binary files differ