コード例 #1
0
        private void BuildChangePlayerPermissionsResponses()
        {
            Model model = GetDialogCustomData <Model>();
            List <PCTerritoryFlagsPermission> permissions = _structure.GetPermissionsByFlagID(model.FlagID);
            List <string> addedKeys = new List <string>();

            ClearPageResponses("PlayerPermissionsPage");

            AddResponseToPage("PlayerPermissionsPage", _color.Green("Add Player"));

            foreach (PCTerritoryFlagsPermission perm in permissions)
            {
                if (!addedKeys.Contains(perm.PlayerID))
                {
                    addedKeys.Add(perm.PlayerID);
                    AddResponseToPage("PlayerPermissionsPage", "Manage Permissions: " + perm.PlayerCharacter.CharacterName, true, new Tuple <string, dynamic>(string.Empty, perm.PlayerID));
                }
            }

            AddResponseToPage("PlayerPermissionsPage", "Back");
        }