Fixed args.Player.Group being used before being set
This commit is contained in:
parent
eaaa657b14
commit
1b8e48b5bf
1 changed files with 6 additions and 4 deletions
|
|
@ -618,9 +618,11 @@ namespace TShockAPI
|
|||
args.Player.State = 2;
|
||||
NetMessage.SendData((int) PacketTypes.WorldInfo, args.Player.Index);
|
||||
|
||||
var group = TShock.Utils.GetGroup(user.Group);
|
||||
|
||||
if (TShock.Config.ServerSideInventory)
|
||||
{
|
||||
if (args.Player.Group.HasPermission(Permissions.bypassinventorychecks))
|
||||
if (group.HasPermission(Permissions.bypassinventorychecks))
|
||||
{
|
||||
args.Player.IgnoreActionsForClearingTrashCan = false;
|
||||
}
|
||||
|
|
@ -632,13 +634,13 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
if (args.Player.Group.HasPermission(Permissions.ignorestackhackdetection))
|
||||
if (group.HasPermission(Permissions.ignorestackhackdetection))
|
||||
args.Player.IgnoreActionsForCheating = "none";
|
||||
|
||||
if (args.Player.Group.HasPermission(Permissions.usebanneditem))
|
||||
if (group.HasPermission(Permissions.usebanneditem))
|
||||
args.Player.IgnoreActionsForDisabledArmor = "none";
|
||||
|
||||
args.Player.Group = TShock.Utils.GetGroup(user.Group);
|
||||
args.Player.Group = group;
|
||||
args.Player.UserAccountName = args.Player.Name;
|
||||
args.Player.UserID = TShock.Users.GetUserID(args.Player.UserAccountName);
|
||||
args.Player.IsLoggedIn = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue