Misc cleanups

This commit is contained in:
hondacrx
2022-06-09 23:07:07 -04:00
parent 6a1d744d0b
commit cda3f96235
4 changed files with 5 additions and 6 deletions
+3 -3
View File
@@ -452,10 +452,10 @@ namespace Game.Chat
realmID = realmId.Value; realmID = realmId.Value;
AccountTypes playerSecurity; AccountTypes playerSecurity;
if (handler.GetSession() != null) if (handler.IsConsole())
playerSecurity = Global.AccountMgr.GetSecurity(handler.GetSession().GetAccountId(), realmID);
else
playerSecurity = AccountTypes.Console; playerSecurity = AccountTypes.Console;
else
playerSecurity = Global.AccountMgr.GetSecurity(handler.GetSession().GetAccountId(), realmID);
// can set security level only for target with less security and to less security that we have // can set security level only for target with less security and to less security that we have
// This is also reject self apply in fact // This is also reject self apply in fact
@@ -411,7 +411,5 @@ namespace Game.Chat.Commands
return true; return true;
} }
} }
} }
} }
@@ -1266,7 +1266,6 @@ namespace Game.Chat
} }
} }
[CommandGroup("send")] [CommandGroup("send")]
class SendCommands class SendCommands
{ {
@@ -236,6 +236,7 @@ namespace Game.Chat
return true; return true;
} }
[CommandGroup("name")]
class TeleNameCommands class TeleNameCommands
{ {
[Command("", RBACPermissions.CommandTeleName, true)] [Command("", RBACPermissions.CommandTeleName, true)]
@@ -279,6 +280,7 @@ namespace Game.Chat
return DoNameTeleport(handler, player, tele.mapId, new Position(tele.posX, tele.posY, tele.posZ, tele.orientation), tele.name); return DoNameTeleport(handler, player, tele.mapId, new Position(tele.posX, tele.posY, tele.posZ, tele.orientation), tele.name);
} }
[CommandGroup("npc")]
class TeleNameNpcCommands class TeleNameNpcCommands
{ {
[Command("guid", RBACPermissions.CommandTeleName, true)] [Command("guid", RBACPermissions.CommandTeleName, true)]