コード例 #1
0
ファイル: OnlinePlayers.cs プロジェクト: Hoikas/mudpit
        private string IGetAgeName(VaultPlayerInfoNode info)
        {
            if (kAgesToName.Contains(info.AgeInstanceName)) {
                VaultAgeInfoNode search = new VaultAgeInfoNode();
                search.InstanceName = info.AgeInstanceName;
                search.InstanceUUID = info.AgeInstanceUUID;

                //Do the search
                uint trans = fParent.AuthCli.FindVaultNode(search.BaseNode.ToArray());
                fParent.RegisterAuthCB(trans, new Action<uint[], VaultPlayerInfoNode>(IDelayedAgeName), new object[] { info });
            }

            if (info.AgeInstanceName == "AhnonayCathedral")
                return "Ahnonay Cathedral";
            else if (info.AgeInstanceName == "AvatarCustomization")
                return "Closet";
            else if (info.AgeInstanceName == "Bevin")
                return "Neighborhood";
            else if (info.AgeInstanceName == "city")
                return "Ae'gura";
            else if (info.AgeInstanceName == "Descent")
                return "Great Shaft";
            else if (info.AgeInstanceName == "EderDelin")
                return "Eder Delin";
            else if (info.AgeInstanceName == "EderTsogal")
                return "Eder Tsogal";
            else if (info.AgeInstanceName == "Ercana")
                return "Er'cana";
            else if (info.AgeInstanceName == "ErcanaCitySilo")
                return "Uran Silo";
            else if (info.AgeInstanceName == "GreatZero")
                return "Great Zero";
            else if (info.AgeInstanceName == "GuildPub-Cartographers")
                return "Cartographers' Pub";
            else if (info.AgeInstanceName == "GuildPub-Greeters")
                return "Greeters' Pub";
            else if (info.AgeInstanceName == "GuildPub-Maintainers")
                return "Maintainers' Pub";
            else if (info.AgeInstanceName == "GuildPub-Messengers")
                return "Messengers' Pub";
            else if (info.AgeInstanceName == "GuildPub-Writers")
                return "Writers' Pub";
            else if (info.AgeInstanceName == "Hood")
                return "Neighborhood";
            else if (info.AgeInstanceName == "Kveer")
                return "K'veer";
            else if (info.AgeInstanceName == "PelletBahroCave")
                return "Pellet Cave";
            else if (info.AgeInstanceName == "Personal")
                return "Relto";
            else if (info.AgeInstanceName == "philRelto")
                return "Phil's Relto";
            else if (info.AgeInstanceName == "spyroom")
                return "Sharper's Spy Room";
            else if (info.AgeInstanceName == String.Empty)
                return "*** Linking ***";

            return info.AgeInstanceName;
        }
コード例 #2
0
ファイル: PublicAgesControl.cs プロジェクト: Hoikas/mudpit
        private void ITryToHackGpKveer(string filename)
        {
            Guid age = Guid.Empty;
            if (filename.Equals("GuildPub-Cartographers"))
                age = fCartographersPub;
            else if (filename.Equals("GuildPub-Greeters"))
                age = fGreetersPub;
            else if (filename.Equals("GuildPub-Maintainers"))
                age = fMaintainersPub;
            else if (filename.Equals("GuildPub-Messengers"))
                age = fMessengersPub;
            else if (filename.Equals("GuildPub-Writers"))
                age = fWritersPub;
            else if (filename.Equals("Kveer"))
                age = fKveer;

            if (age == Guid.Empty)
                return;

            VaultAgeInfoNode info = new VaultAgeInfoNode();
            info.Filename = filename;
            info.InstanceUUID = age;

            uint transID = fParent.AuthCli.FindVaultNode(info.BaseNode.ToArray());
            fParent.RegisterAuthCB(transID, new Action<uint[], string>(ITryToHackGpKveer), new object[] { filename });
        }
コード例 #3
0
ファイル: OnlinePlayers.cs プロジェクト: Hoikas/mudpit
        private void IDelayedAgeName(VaultNode node, VaultPlayerInfoNode info)
        {
            VaultAgeInfoNode age = new VaultAgeInfoNode(node);

            string name = String.Empty;
            if (age.Description == String.Empty)
                if (age.SequenceNumber == 0)
                    name = String.Format("{0} {1}", age.UserDefinedName, age.InstanceName);
                else
                    name = String.Format("{0} ({1}) {2}", age.UserDefinedName, age.SequenceNumber, age.InstanceName);
            else
                name = age.Description;

            //Find the player's row
            int idx = -1;
            foreach (DataGridViewRow r in fDataGridView.Rows) {
                if (Convert.ToUInt32(r.Cells[1].Value) == info.PlayerID) {
                    idx = fDataGridView.Rows.IndexOf(r);
                    break;
                }
            }

            //Actually update the entry
            fDataGridView.Rows[idx].Cells[3].Value = name;
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: Hoikas/mudpit
        private void IAddFolderToPanes(VaultNode node)
        {
            if (node.NodeType == ENodeType.kNodePlayerInfoList) {
                VaultPlayerInfoListNode list = new VaultPlayerInfoListNode(node);

                //Basic stuff
                if (list.FolderType == EStandardNode.kBuddyListFolder) fBaseNodes.Add(EStandardNode.kBuddyListFolder, node.ID);
                if (list.FolderType == EStandardNode.kIgnoreListFolder) fBaseNodes.Add(EStandardNode.kIgnoreListFolder, node.ID);
                if (list.FolderType == EStandardNode.kPeopleIKnowAboutFolder) fBaseNodes.Add(EStandardNode.kPeopleIKnowAboutFolder, node.ID);

                //If it's an AgeOwners folder, we have the Neighborhood :)
                if (list.FolderType == EStandardNode.kAgeOwnersFolder) fBaseNodes.Add(EStandardNode.kHoodMembersFolder, node.ID);
            }

            //Search for Neighborhood in the AgesIOwn
            if (node.NodeType == ENodeType.kNodeAgeInfoList) {
                VaultAgeInfoListNode ages = new VaultAgeInfoListNode(node);
                if (ages.FolderType == EStandardNode.kAgesIOwnFolder) {
                    FetchChildren(node.ID, new Action<VaultNode>(IAddFolderToPanes));
                }
            }

            //Grab the AgeInfo...
            if (node.NodeType == ENodeType.kNodeAgeLink)
                FetchChildren(node.ID, new Action<VaultNode>(IAddFolderToPanes));

            //See if this is the Neighborhood or Relto
            if (node.NodeType == ENodeType.kNodeAgeInfo) {
                VaultAgeInfoNode ageinfo = new VaultAgeInfoNode(node);
                if (ageinfo.Filename == "Neighborhood") {
                    //Yep! Grab children :)
                    FetchChildren(node.ID, new Action<VaultNode>(IAddFolderToPanes));
                }

                //HACK!!! Change back to PERSONAL asap!
                if (ageinfo.Filename == "Neighborhood") {
                    //Stash this node! Oh, and YES this is a strange label, but whatev.
                    fBaseNodes.Add(EStandardNode.kAgeInfoNode, ageinfo.ID);
                }
            }

            //Are these KI Mail Folders?
            if (node.NodeType == ENodeType.kNodeFolder) {
                VaultFolderNode folder = new VaultFolderNode(node);
                if (folder.FolderType == EStandardNode.kAgeJournalsFolder) fBaseNodes.Add(EStandardNode.kAgeJournalsFolder, node.ID);
                if (folder.FolderType == EStandardNode.kInboxFolder) fBaseNodes.Add(EStandardNode.kInboxFolder, node.ID);

            }

            //Is this my PlayerInfo?
            if (node.NodeType == ENodeType.kNodePlayerInfo) {
                VaultPlayerInfoNode info = new VaultPlayerInfoNode(node);
                if (info.PlayerID == fActivePlayer) fBaseNodes.Add(EStandardNode.kPlayerInfoNode, info.ID);
            }

            //FIXME: This is a strange hack...
            //Aparently, it causes the selected tab to update. I would say this is spammy though.
            ITabSelected(null, new TabControlEventArgs(fTabControl.SelectedTab, fTabControl.SelectedIndex, TabControlAction.Selected));
        }