tModLoader Conversion of a tAPI mod

Sheonori

Skeletron Prime
Hi guys and girls,

I made a mod a while ago with the help of some other people on tAPI to basically remove the Mana Sickness debuff. Of course it doesn't work anymore, and I would like to convert it to tModLoader. The problem is that I have no idea how to do it. I tried some things but it doesn't work.

Here is the code of my old mod, if you could help me, I would greatly appreciate it :)

Code:
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using TAPI;

namespace NoManaSickness
{
public class MPlayer : TAPI.ModPlayer
{

public override void PostUpdate()
{
for (int index = 0; index < 22; ++index)
{
if (player.buffType[index] == 94)
{
player.buffTime[index] = 0;
player.buffType[index] = 0;
}
}
}
}
}
 
Hi guys and girls,

I made a mod a while ago with the help of some other people on tAPI to basically remove the Mana Sickness debuff. Of course it doesn't work anymore, and I would like to convert it to tModLoader. The problem is that I have no idea how to do it. I tried some things but it doesn't work.

Here is the code of my old mod, if you could help me, I would greatly appreciate it :)

Code:
using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using TAPI;

namespace NoManaSickness
{
public class MPlayer : TAPI.ModPlayer
{

public override void PostUpdate()
{
for (int index = 0; index < 22; ++index)
{
if (player.buffType[index] == 94)
{
player.buffTime[index] = 0;
player.buffType[index] = 0;
}
}
}
}
}
Update your references to include tModLoader, then delete the "TAPI." in front of your ModPlayer type. I don't think there's anything else you need to do.
 
Back
Top Bottom