Added Disconnect, SendTileSquare, SetPvP to TSPlayer

Added SetBloodMoon, SetTime, StrikeNPC to TSServerPlayer
This commit is contained in:
ricky 2011-06-17 02:08:49 +10:00
parent 5a0b00b398
commit 7bccfbe441
5 changed files with 87 additions and 70 deletions

View file

@ -367,8 +367,7 @@ namespace TShockAPI
}
if (ConfigurationManager.PermaPvp)
{
Main.player[who].hostile = true;
NetMessage.SendData(30, -1, -1, "", who);
player.SetPvP(true);
}
if (Players[who].Group.HasPermission("causeevents") && ConfigurationManager.InfiniteInvasion)
{
@ -465,17 +464,6 @@ namespace TShockAPI
}
}
public static void PlayerDamage(TSPlayer player, int damage)
{
NetMessage.SendData(26, -1, -1, "", player.Index, ((new Random()).Next(-1, 1)), damage, (float)0);
}
public static void SendTileSquare(TSPlayer player, int x, int y, int size = 10)
{
NetMessage.SendData(20, player.Index, -1, "", size, (float)(x - (size / 2)), (float)(y - (size / 2)), 0f);
}
//TODO : Notify the player if there is more than one match. (or do we want a First() kinda thing?)
public static int GetNPCID(string name, bool exact = false)
{