Merge branch 'master' of git.assembla.com:terraria
This commit is contained in:
commit
270100e08a
1 changed files with 24 additions and 23 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Terraria;
|
using Terraria;
|
||||||
using TerrariaAPI;
|
using TerrariaAPI;
|
||||||
using TerrariaAPI.Hooks;
|
using TerrariaAPI.Hooks;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace TShockAPI
|
namespace TShockAPI
|
||||||
{
|
{
|
||||||
|
|
@ -91,15 +91,6 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnPreGetData(byte id, messageBuffer msg, int idx, int length, HandledEventArgs e)
|
|
||||||
{
|
|
||||||
if (Main.netMode != 2) { return; }
|
|
||||||
if (id == 0x1e && ConfigurationManager.permaPvp)
|
|
||||||
{
|
|
||||||
e.Handled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GetData(GetDataEventArgs e)
|
void GetData(GetDataEventArgs e)
|
||||||
{
|
{
|
||||||
if (Main.netMode != 2) { return; }
|
if (Main.netMode != 2) { return; }
|
||||||
|
|
@ -126,6 +117,16 @@ namespace TShockAPI
|
||||||
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
|
||||||
|
{
|
||||||
|
Tools.Broadcast(string.Format("{0}({1}) attempted sending a section", Main.player[e.Msg.whoAmI].name, e.Msg.whoAmI));
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
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));
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnGreetPlayer(int who, HandledEventArgs e)
|
void OnGreetPlayer(int who, HandledEventArgs e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue