From 7d4a96cfee40a0fc226e90f296d0ccf6841d429c Mon Sep 17 00:00:00 2001 From: White Date: Sun, 1 Nov 2015 12:13:17 +1030 Subject: [PATCH] Fixes #1134 and #1131 --- TShockAPI/Commands.cs | 2 +- TShockAPI/TSPlayer.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index dba03176..4ab71eb0 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -5028,7 +5028,7 @@ namespace TShockAPI { if (Main.npc[i].active && ((npcId == 0 && !Main.npc[i].townNPC && Main.npc[i].netID != NPCID.TargetDummy) || Main.npc[i].netID == npcId)) { - TSPlayer.Server.StrikeNPC(i, 99999, 0, 0); + TSPlayer.Server.StrikeNPC(i, (int)(Main.npc[i].life + (Main.npc[i].defense*0.5)), 0, 0); kills++; } } diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 6363a968..75d35d52 100755 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -811,7 +811,8 @@ namespace TShockAPI public virtual void SetTeam(int team) { Main.player[Index].team = team; - SendData(PacketTypes.PlayerTeam, "", Index); + NetMessage.SendData((int)PacketTypes.PlayerTeam, -1, -1, "", Index); + NetMessage.SendData((int)PacketTypes.PlayerTeam, -1, Index, "", Index); } private DateTime LastDisableNotification = DateTime.UtcNow;