Пример #1
0
        private uint? ICreateStdNode(EStandardNode type, uint cIdx, Guid cGuid)
        {
            pnVaultNodeAccess vna = null;
            switch (type) {
                case EStandardNode.kAgeDevicesFolder:
                case EStandardNode.kAgeJournalsFolder:
                case EStandardNode.kAgeTypeJournalFolder:
                case EStandardNode.kAllAgeGlobalSDLNodesFolder: // If you create this, I'll kill you.
                case EStandardNode.kAvatarClosetFolder:
                case EStandardNode.kAvatarOutfitFolder:
                case EStandardNode.kChronicleFolder:
                case EStandardNode.kDeviceInboxFolder:
                case EStandardNode.kGameScoresFolder:
                case EStandardNode.kGlobalInboxFolder:
                case EStandardNode.kInboxFolder:
                case EStandardNode.kPlayerInviteFolder:
                case EStandardNode.kVaultMgrGlobalDataFolder:
                    vna = new pnVaultFolderNode();
                    ((pnVaultFolderNode)vna).FolderType = type;
                    break;
                case EStandardNode.kAgeMembersFolder:
                case EStandardNode.kAgeOwnersFolder:
                case EStandardNode.kAllPlayersFolder:
                case EStandardNode.kBuddyListFolder:
                case EStandardNode.kCanVisitFolder:
                case EStandardNode.kCCRPlayersFolder: // If you create this, I'll REALLY kill you.
                case EStandardNode.kHoodMembersFolder:
                case EStandardNode.kIgnoreListFolder:
                case EStandardNode.kPeopleIKnowAboutFolder:
                    vna = new pnVaultPlayerInfoListNode();
                    ((pnVaultPlayerInfoListNode)vna).FolderType = type;
                    break;
                case EStandardNode.kAgesICanVisitFolder:
                case EStandardNode.kAgesIOwnFolder:
                case EStandardNode.kChildAgesFolder:
                case EStandardNode.kPublicAgesFolder: // If you create this, I'll resurrect you to kill you again.
                case EStandardNode.kSubAgesFolder:
                    vna = new pnVaultAgeInfoListNode();
                    ((pnVaultAgeInfoListNode)vna).FolderType = type;
                    break;
                case EStandardNode.kSystemNode:
                    vna = new pnVaultSystemNode();
                    break;
                default:
                    Warn("Tried to Create a SimpleStdNode for: " + type.ToString());
                    return new uint?();
            }

            if (cIdx != 0)
                vna.CreatorID = cIdx;
            if (cGuid != Guid.Empty)
                vna.CreatorUuid = cGuid;

            try {
                ICreateNode(vna.BaseNode);
            } catch (pnDbException e) {
                Error(e, "Failed to Create a SimpleStdNode");
                return new uint?();
            }

            return new uint?(vna.NodeID);
        }
Пример #2
0
 private uint? ICreateStdNode(EStandardNode type)
 {
     return ICreateStdNode(type, 0, Guid.Empty);
 }