Grrr paramater assigment, why dont you have final for paramater C#.
This commit is contained in:
parent
8f1c1ede28
commit
8d13023dac
2 changed files with 8 additions and 10 deletions
|
|
@ -813,9 +813,7 @@ namespace TShockAPI
|
||||||
int killcount = 0;
|
int killcount = 0;
|
||||||
for (int i = 0; i < Main.npc.Length; i++)
|
for (int i = 0; i < Main.npc.Length; i++)
|
||||||
{
|
{
|
||||||
if (Main.npc[i].townNPC || !Main.npc[i].active)
|
if (!Main.npc[i].townNPC && !Main.npc[i].active)
|
||||||
continue;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Main.npc[i].StrikeNPC(99999, 90f, 1);
|
Main.npc[i].StrikeNPC(99999, 90f, 1);
|
||||||
NetMessage.SendData(28, -1, -1, "", i, 99999, 90f, 1);
|
NetMessage.SendData(28, -1, -1, "", i, 99999, 90f, 1);
|
||||||
|
|
|
||||||
|
|
@ -204,8 +204,8 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
if (text.StartsWith("/"))
|
if (text.StartsWith("/"))
|
||||||
{
|
{
|
||||||
text = text.Remove(0, 1);
|
string cmdStr = text.Remove(0, 1);
|
||||||
var args = Commands.ParseParameters(text);
|
var args = Commands.ParseParameters(cmdStr);
|
||||||
if (args.Count < 1)
|
if (args.Count < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -227,16 +227,16 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Tools.SendLogs(string.Format("{0} executed: /{1}", TSPlayer.Server.Name, text), Color.Red);
|
Tools.SendLogs(string.Format("{0} executed: /{1}", TSPlayer.Server.Name, cmdStr), Color.Red);
|
||||||
cmd.Run(text, TSPlayer.Server, args);
|
cmd.Run(cmdStr, TSPlayer.Server, args);
|
||||||
}
|
}
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
if (text.StartsWith("exit"))
|
else if (text.StartsWith("exit"))
|
||||||
{
|
{
|
||||||
Tools.ForceKickAll("Server shutting down!");
|
Tools.ForceKickAll("Server shutting down!");
|
||||||
}
|
}
|
||||||
if (text.StartsWith("playing"))
|
else if (text.StartsWith("playing"))
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
foreach (TSPlayer player in Players)
|
foreach (TSPlayer player in Players)
|
||||||
|
|
@ -250,7 +250,7 @@ namespace TShockAPI
|
||||||
Console.WriteLine(string.Format("{0} players connected.", count));
|
Console.WriteLine(string.Format("{0} players connected.", count));
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
if (text.StartsWith("say "))
|
else if (text.StartsWith("say "))
|
||||||
Log.Info(string.Format("Server said: {0}", text.Remove(0, 4)));
|
Log.Info(string.Format("Server said: {0}", text.Remove(0, 4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue