Merge branch 'general-devel' into fix-invalid-groups

This commit is contained in:
Chris 2021-08-25 19:16:57 +09:30 committed by GitHub
commit 09a2947cf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 146 additions and 16 deletions

View file

@ -2364,6 +2364,12 @@ namespace TShockAPI
NetMessage.SendData((int)PacketTypes.PlayerInfo, -1, args.Player.Index, NetworkText.FromLiteral(args.Player.Name), args.Player.Index);
return true;
}
if (TShock.Config.Settings.SoftcoreOnly && difficulty != 0)
{
TShock.Log.ConsoleDebug("GetDataHandlers / HandlePlayerInfo rejected softcore required");
args.Player.Kick("You need to join with a softcore player.", true, true);
return true;
}
if (TShock.Config.Settings.MediumcoreOnly && difficulty < 1)
{
TShock.Log.ConsoleDebug("GetDataHandlers / HandlePlayerInfo rejected mediumcore required");
@ -2832,6 +2838,17 @@ namespace TShockAPI
else
TShock.Utils.SendLogs(string.Format($"{args.Player.Name} summoned the Empress of Light!"), Color.PaleVioletRed, args.Player);
}
if (Main.npc[id].netID == NPCID.CultistDevote || Main.npc[id].netID == NPCID.CultistArcherBlue)
{
if (!args.Player.HasPermission(Permissions.summonboss))
{
args.Player.SendErrorMessage("You do not have permission to summon the Lunatic Cultist!");
args.Player.SendData(PacketTypes.NpcUpdate, "", id);
TShock.Log.ConsoleDebug($"GetDataHandlers / HandleNpcStrike rejected Cultist summon from {args.Player.Name}");
return true;
}
}
return false;
}