Ejemplo n.º 1
0
void pyVault::UnInvitePlayerToAge( const char * str, uint32_t playerID )
{
    plAgeInfoStruct info;
    plUUID guid(str);
    info.SetAgeInstanceGuid(&guid);

    if (RelVaultNode * rvnLink = VaultGetOwnedAgeLinkIncRef(&info)) {
        if (RelVaultNode * rvnInfo = rvnLink->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1)) {
            VaultAgeInfoNode ageInfo(rvnInfo);
            ageInfo.CopyTo(&info);
            rvnInfo->DecRef();
        }

        rvnLink->DecRef();
    }

    NetVaultNode * templateNode = new NetVaultNode;
    templateNode->IncRef();
    templateNode->SetNodeType(plVault::kNodeType_TextNote);
    VaultTextNoteNode visitAcc(templateNode);
    visitAcc.SetNoteType(plVault::kNoteType_UnVisit);
    visitAcc.SetVisitInfo(info);
    VaultCreateNode(templateNode, (FVaultCreateNodeCallback)_UninvitePlayerToAge, nil, (void*)playerID);
    templateNode->DecRef();
}
Ejemplo n.º 2
0
void pyVault::InvitePlayerToAge( const pyAgeLinkStruct & link, uint32_t playerID )
{
    hsRef<NetVaultNode> templateNode = new NetVaultNode;
    templateNode->SetNodeType(plVault::kNodeType_TextNote);
    VaultTextNoteNode visitAcc(templateNode);
    visitAcc.SetNoteType(plVault::kNoteType_Visit);
    visitAcc.SetVisitInfo(*link.GetAgeLink()->GetAgeInfo());
    VaultCreateNode(templateNode, (FVaultCreateNodeCallback)_InvitePlayerToAge, nil, (void*)playerID);
}