Updating stuff
This commit is contained in:
parent
3ccdba9f51
commit
b50e7d2f54
1 changed files with 8 additions and 18 deletions
|
|
@ -63,16 +63,6 @@ namespace TShockAPI
|
||||||
ServerHooks.OnChat += new Action<int, string, HandledEventArgs>(OnChat);
|
ServerHooks.OnChat += new Action<int, string, HandledEventArgs>(OnChat);
|
||||||
ServerHooks.OnJoin += new Action<int, AllowEventArgs>(OnJoin);
|
ServerHooks.OnJoin += new Action<int, AllowEventArgs>(OnJoin);
|
||||||
NetHooks.OnGreetPlayer += new NetHooks.GreetPlayerD(OnGreetPlayer);
|
NetHooks.OnGreetPlayer += new NetHooks.GreetPlayerD(OnGreetPlayer);
|
||||||
NetHooks.OnPreGetData += new NetHooks.GetDataD(OnPreGetData);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnPreGetData(byte id, messageBuffer msg, int idx, int length, HandledEventArgs e)
|
|
||||||
{
|
|
||||||
if (id == 0x1e && permaPvp)
|
|
||||||
{
|
|
||||||
e.Handled = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -82,7 +72,6 @@ namespace TShockAPI
|
||||||
void OnGreetPlayer(int who, HandledEventArgs e)
|
void OnGreetPlayer(int who, HandledEventArgs e)
|
||||||
{
|
{
|
||||||
int plr = who; //legacy support
|
int plr = who; //legacy support
|
||||||
e.Handled = true;
|
|
||||||
ShowMOTD(who);
|
ShowMOTD(who);
|
||||||
if (Main.player[plr].statLifeMax > 400 || Main.player[plr].statManaMax > 200 || Main.player[plr].statLife > 400 || Main.player[plr].statMana > 200)
|
if (Main.player[plr].statLifeMax > 400 || Main.player[plr].statManaMax > 200 || Main.player[plr].statLife > 400 || Main.player[plr].statMana > 200)
|
||||||
{
|
{
|
||||||
|
|
@ -93,6 +82,7 @@ namespace TShockAPI
|
||||||
Main.player[who].hostile = true;
|
Main.player[who].hostile = true;
|
||||||
NetMessage.SendData(30, -1, -1, "", who);
|
NetMessage.SendData(30, -1, -1, "", who);
|
||||||
}
|
}
|
||||||
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnChat(int ply, string msg, HandledEventArgs handler)
|
void OnChat(int ply, string msg, HandledEventArgs handler)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue