// Send this node to the destination client node. will be received in it's inbox folder. void pyVaultNode::SendTo(uint32_t destClientNodeID, PyObject* cbObject, uint32_t cbContext ) { pyVaultNodeOperationCallback * cb = new pyVaultNodeOperationCallback( cbObject ); if (fNode) { // If the node doesn't have an id, then use it as a template to create the node in the vault, if (!fNode->GetNodeId() && fNode->GetNodeType()) { ENetError result; if (RelVaultNode * node = VaultCreateNodeAndWaitIncRef(fNode, &result)) { fNode->UnRef(); fNode = node; } } // Hack the callbacks until vault notification is in place cb->VaultOperationStarted( cbContext ); VaultSendNode(fNode, destClientNodeID); cb->VaultOperationComplete( cbContext, hsOK ); } else { // manually make the callback cb->VaultOperationStarted( cbContext ); cb->VaultOperationComplete( cbContext, hsFail ); } }
//============================================================================ void _UninvitePlayerToAge(ENetError result, void* state, void* param, RelVaultNode* node) { if (result == kNetSuccess) VaultSendNode(node, (uint32_t)((uintptr_t)param)); }