Exemplo n.º 1
0
        private void BuildManagePlayerPermissionsHeader()
        {
            Model           model        = GetDialogCustomData <Model>();
            PlayerCharacter playerEntity = _player.GetPlayerEntity(model.ActivePermissionsPlayerID);
            List <PCTerritoryFlagsPermission> permissions = _structure.GetPermissionsByPlayerID(model.ActivePermissionsPlayerID, model.FlagID);

            string header = _color.Green("Manage Player Permissions") + "\n\n";

            header += _color.Green("Player: ") + playerEntity.CharacterName + "\n\n";
            header += _color.Green("Current Permissions:\n\n");

            if (permissions == null || permissions.Count <= 0)
            {
                header += "No permissions have been set for this player.";
            }
            else
            {
                foreach (PCTerritoryFlagsPermission perm in permissions)
                {
                    header += perm.TerritoryFlagPermission.Name + "\n";
                }
            }

            SetPageHeader("ManagePlayerPermissionsPage", header);
        }