Add Lunatic Cultist summon permission check
Didn't bother adding the broadcast stuff bc there's 4 cultists and it'll prob spam the chat if multiple players kill them at around the same time
This commit is contained in:
parent
26460a13c4
commit
10e0b33e82
1 changed files with 11 additions and 0 deletions
|
|
@ -2829,6 +2829,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue