fix: Prevent setting properties of higher privileged mobiles (#1420)

---------

Co-authored-by: Kamron Batman <3953314+kamronbatman@users.noreply.github.com>
This commit is contained in:
Mink80 2023-07-16 07:01:33 +02:00 • committed by GitHub
parent 8ff105ac46
commit e9fa2bf9fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 0 deletions

View file

@ -1,5 +1,6 @@
using System.Reflection;
using Server.Commands;
using Server.Commands.Generic;
using Server.Network;
using static Server.Gumps.PropsConfig;
@ -164,6 +165,14 @@ namespace Server.Gumps
public override void OnResponse(NetState sender, RelayInfo info)
{
var from = sender.Mobile;
if (!BaseCommand.IsAccessible(from, m_Object))
{
from.SendMessage("You may no longer access their properties.");
return;
}
var index = info.ButtonID - 1;
if (index >= 0 && index < m_Values.Length)