Merge branch 'general-devel' of github.com:TShock/TShock into general-devel
Conflicts: TShockAPI/TShock.cs
This commit is contained in:
commit
73b3def96f
2 changed files with 6 additions and 3 deletions
|
|
@ -274,7 +274,7 @@ namespace TShockAPI
|
|||
{
|
||||
int ply = args.PlayerID;
|
||||
string player = args.Message.Remove(0, 3).Trim();
|
||||
if (Tools.FindPlayer(player) != -1 && player != "")
|
||||
if (Tools.FindPlayer(player) != -1 && Tools.FindPlayer(player) != -2 && player != "")
|
||||
{
|
||||
TShock.Teleport(ply, Main.player[Tools.FindPlayer(player)].position.X, Main.player[Tools.FindPlayer(player)].position.Y);
|
||||
Tools.SendMessage(ply, "Teleported to " + player);
|
||||
|
|
@ -287,7 +287,7 @@ namespace TShockAPI
|
|||
{
|
||||
int ply = args.PlayerID;
|
||||
string player = args.Message.Remove(0, 7).Trim();
|
||||
if (Tools.FindPlayer(player) != -1 && player != "")
|
||||
if (Tools.FindPlayer(player) != -1 && Tools.FindPlayer(player) != -2 && player != "")
|
||||
{
|
||||
TShock.Teleport(Tools.FindPlayer(player), Main.player[ply].position.X, Main.player[ply].position.Y);
|
||||
Tools.SendMessage(Tools.FindPlayer(player), "You were teleported to " + Tools.FindPlayer(ply) + ".");
|
||||
|
|
|
|||
|
|
@ -738,8 +738,11 @@ namespace TShockAPI
|
|||
{
|
||||
for (int i = 0; i < 44; i++)
|
||||
{
|
||||
if (Main.player[plr].inventory[i].stack > 255)
|
||||
if (Main.player[plr].inventory[i].stack > Main.player[plr].inventory[i].maxStack)
|
||||
{
|
||||
Log.Info(Tools.FindPlayer(plr) + " had " + Main.player[plr].inventory[i].stack.ToString() + " of " + Main.player[plr].inventory[i].name + " which has a max stack of " + Main.player[plr].inventory[i].maxStack.ToString());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue