Changed ifs into else ifs for optimization purposes

This commit is contained in:
Maverick Motherfucker 2011-06-02 21:30:16 -07:00
parent 892ef0c770
commit 087dfabffe

View file

@ -164,19 +164,19 @@ namespace TShockAPI
} }
return; return;
} }
if (e.MsgID == 0x1e) else if (e.MsgID == 0x1e)
{ {
Main.player[e.Msg.whoAmI].hostile = true; Main.player[e.Msg.whoAmI].hostile = true;
NetMessage.SendData(30, -1, -1, "", e.Msg.whoAmI); NetMessage.SendData(30, -1, -1, "", e.Msg.whoAmI);
e.Handled = true; e.Handled = true;
} }
if (e.MsgID == 0x0A) //SendSection else if (e.MsgID == 0x0A) //SendSection
{ {
Tools.Broadcast(string.Format("{0}({1}) attempted sending a section", Main.player[e.Msg.whoAmI].name, e.Msg.whoAmI)); Tools.Broadcast(string.Format("{0}({1}) attempted sending a section", Main.player[e.Msg.whoAmI].name, e.Msg.whoAmI));
Tools.Kick(e.Msg.whoAmI, "SendSection abuse."); Tools.Kick(e.Msg.whoAmI, "SendSection abuse.");
e.Handled = true; e.Handled = true;
} }
if (e.MsgID == 0x17) //Npc Data else if (e.MsgID == 0x17) //Npc Data
{ {
Tools.Broadcast(string.Format("{0}({1}) attempted spawning an NPC", Main.player[e.Msg.whoAmI].name, e.Msg.whoAmI)); Tools.Broadcast(string.Format("{0}({1}) attempted spawning an NPC", Main.player[e.Msg.whoAmI].name, e.Msg.whoAmI));
Tools.Kick(e.Msg.whoAmI, "Spawn NPC abuse"); Tools.Kick(e.Msg.whoAmI, "Spawn NPC abuse");