mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Replace most vault *IncRef() API functions with hsRef versions
This commit is contained in:
@ -802,7 +802,7 @@ bool plClothingOutfit::IReadFromVault()
|
||||
|
||||
WearDefaultClothing();
|
||||
|
||||
RelVaultNode * rvn = VaultGetAvatarOutfitFolderIncRef();
|
||||
hsRef<RelVaultNode> rvn = VaultGetAvatarOutfitFolder();
|
||||
if (!rvn)
|
||||
return false;
|
||||
|
||||
@ -837,7 +837,6 @@ bool plClothingOutfit::IReadFromVault()
|
||||
fSynchClients = true; // set true if the next synch should be bcast
|
||||
ForceUpdate(true);
|
||||
|
||||
rvn->UnRef();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -857,8 +856,8 @@ void plClothingOutfit::WriteToVault()
|
||||
if (!fVaultSaveEnabled)
|
||||
return;
|
||||
|
||||
RelVaultNode * rvn;
|
||||
if (nil == (rvn = VaultGetAvatarOutfitFolderIncRef()))
|
||||
hsRef<RelVaultNode> rvn = VaultGetAvatarOutfitFolder();
|
||||
if (!rvn)
|
||||
return;
|
||||
|
||||
ARRAY(plStateDataRecord*) SDRs;
|
||||
@ -874,7 +873,6 @@ void plClothingOutfit::WriteToVault()
|
||||
SDRs.Add(appearanceStateDesc->GetStateDataRecord(0));
|
||||
|
||||
WriteToVault(SDRs);
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
void plClothingOutfit::WriteToVault(const ARRAY(plStateDataRecord*) & SDRs)
|
||||
@ -883,8 +881,8 @@ void plClothingOutfit::WriteToVault(const ARRAY(plStateDataRecord*) & SDRs)
|
||||
if (fAvatar->GetTarget(0) != plNetClientApp::GetInstance()->GetLocalPlayer())
|
||||
return;
|
||||
|
||||
RelVaultNode * rvn;
|
||||
if (nil == (rvn = VaultGetAvatarOutfitFolderIncRef()))
|
||||
hsRef<RelVaultNode> rvn = VaultGetAvatarOutfitFolder();
|
||||
if (!rvn)
|
||||
return;
|
||||
|
||||
ARRAY(plStateDataRecord*) morphs;
|
||||
@ -922,25 +920,19 @@ void plClothingOutfit::WriteToVault(const ARRAY(plStateDataRecord*) & SDRs)
|
||||
|
||||
// Write all SDL to to the outfit folder, reusing existing nodes and creating new ones as necessary
|
||||
for (unsigned i = 0; i < arr->Count(); ++i) {
|
||||
RelVaultNode * node;
|
||||
hsRef<RelVaultNode> node;
|
||||
if (nodes.Count()) {
|
||||
node = nodes[0];
|
||||
nodes.DeleteUnordered(0);
|
||||
node->Ref(); // REF: Work
|
||||
node->UnRef(); // REF: Find
|
||||
}
|
||||
else {
|
||||
RelVaultNode * templateNode = new RelVaultNode;
|
||||
templateNode->SetNodeType(plVault::kNodeType_SDL);
|
||||
templates.Add(templateNode);
|
||||
node = templateNode;
|
||||
node->Ref(); // REF: Create
|
||||
node->Ref(); // REF: Work
|
||||
node = new RelVaultNode;
|
||||
node->SetNodeType(plVault::kNodeType_SDL);
|
||||
templates.Add(node);
|
||||
}
|
||||
|
||||
VaultSDLNode sdl(node);
|
||||
sdl.SetStateDataRecord((*arr)[i], 0);
|
||||
node->UnRef(); // REF: Work
|
||||
}
|
||||
}
|
||||
|
||||
@ -953,7 +945,8 @@ void plClothingOutfit::WriteToVault(const ARRAY(plStateDataRecord*) & SDRs)
|
||||
// Create actual new nodes from their templates
|
||||
for (unsigned i = 0; i < templates.Count(); ++i) {
|
||||
ENetError result;
|
||||
if (RelVaultNode * actual = VaultCreateNodeAndWaitIncRef(templates[i], &result)) {
|
||||
if (hsRef<RelVaultNode> actual = VaultCreateNodeAndWait(templates[i], &result)) {
|
||||
actual->Ref();
|
||||
actuals.Add(actual);
|
||||
}
|
||||
templates[i]->UnRef(); // REF: Create
|
||||
@ -1483,7 +1476,7 @@ bool plClothingOutfit::WriteToFile(const plFileName &filename)
|
||||
if (!filename.IsValid())
|
||||
return false;
|
||||
|
||||
RelVaultNode* rvn = VaultGetAvatarOutfitFolderIncRef();
|
||||
hsRef<RelVaultNode> rvn = VaultGetAvatarOutfitFolder();
|
||||
if (!rvn)
|
||||
return false;
|
||||
|
||||
@ -1505,7 +1498,6 @@ bool plClothingOutfit::WriteToFile(const plFileName &filename)
|
||||
S.Write(sdl.GetSDLDataLength(), sdl.GetSDLData());
|
||||
nodes[i]->UnRef();
|
||||
}
|
||||
rvn->UnRef();
|
||||
|
||||
S.Close();
|
||||
return true;
|
||||
@ -1626,7 +1618,7 @@ plClothingElement *plClothingMgr::FindElementByName(const plString &name) const
|
||||
|
||||
void plClothingMgr::AddItemsToCloset(hsTArray<plClosetItem> &items)
|
||||
{
|
||||
RelVaultNode * rvn = VaultGetAvatarClosetFolderIncRef();
|
||||
hsRef<RelVaultNode> rvn = VaultGetAvatarClosetFolder();
|
||||
if (!rvn)
|
||||
return;
|
||||
|
||||
@ -1663,23 +1655,20 @@ void plClothingMgr::AddItemsToCloset(hsTArray<plClosetItem> &items)
|
||||
|
||||
for (unsigned i = 0; i < templates.Count(); ++i) {
|
||||
ENetError result;
|
||||
if (RelVaultNode * actual = VaultCreateNodeAndWaitIncRef(templates[i], &result)) {
|
||||
if (hsRef<RelVaultNode> actual = VaultCreateNodeAndWait(templates[i], &result)) {
|
||||
VaultAddChildNodeAndWait(
|
||||
rvn->GetNodeId(),
|
||||
actual->GetNodeId(),
|
||||
NetCommGetPlayer()->playerInt
|
||||
);
|
||||
actual->UnRef(); // REF: Create
|
||||
}
|
||||
templates[i]->UnRef(); // REF: Create
|
||||
}
|
||||
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
void plClothingMgr::GetClosetItems(hsTArray<plClosetItem> &out)
|
||||
{
|
||||
RelVaultNode * rvn = VaultGetAvatarClosetFolderIncRef();
|
||||
hsRef<RelVaultNode> rvn = VaultGetAvatarClosetFolder();
|
||||
if (!rvn)
|
||||
return;
|
||||
|
||||
@ -1701,9 +1690,7 @@ void plClothingMgr::GetClosetItems(hsTArray<plClosetItem> &out)
|
||||
out.Remove(i);
|
||||
}
|
||||
}
|
||||
|
||||
rvn->UnRef();
|
||||
}
|
||||
}
|
||||
|
||||
void plClothingMgr::GetAllWithSameMesh(plClothingItem *item, hsTArray<plClothingItem*> &out)
|
||||
{
|
||||
|
@ -858,7 +858,7 @@ void plSceneInputInterface::ILinkOffereeToAge()
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (RelVaultNode * linkNode = VaultGetOwnedAgeLinkIncRef(&info)) {
|
||||
else if (hsRef<RelVaultNode> linkNode = VaultGetOwnedAgeLink(&info)) {
|
||||
// We have the age in our AgesIOwnFolder. If its volatile, dump it for the new one.
|
||||
VaultAgeLinkNode linkAcc(linkNode);
|
||||
if (linkAcc.GetVolatile()) {
|
||||
@ -868,7 +868,6 @@ void plSceneInputInterface::ILinkOffereeToAge()
|
||||
VaultRegisterOwnedAgeAndWait(&link);
|
||||
}
|
||||
}
|
||||
linkNode->UnRef();
|
||||
}
|
||||
|
||||
if (!fSpawnPoint.IsEmpty()) {
|
||||
|
@ -513,13 +513,13 @@ bool plNetLinkingMgr::IProcessVaultNotifyMsg(plVaultNotifyMsg* msg)
|
||||
return false;
|
||||
|
||||
plAgeLinkStruct* cur = GetAgeLink();
|
||||
RelVaultNode* cVaultLink = nil;
|
||||
hsRef<RelVaultNode> cVaultLink;
|
||||
switch (msg->GetType())
|
||||
{
|
||||
case plVaultNotifyMsg::kRegisteredChildAgeLink:
|
||||
case plVaultNotifyMsg::kRegisteredOwnedAge:
|
||||
case plVaultNotifyMsg::kRegisteredSubAgeLink:
|
||||
cVaultLink = VaultGetNodeIncRef(msg->GetArgs()->GetInt(plNetCommon::VaultTaskArgs::kAgeLinkNode));
|
||||
cVaultLink = VaultGetNode(msg->GetArgs()->GetInt(plNetCommon::VaultTaskArgs::kAgeLinkNode));
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
@ -531,18 +531,15 @@ bool plNetLinkingMgr::IProcessVaultNotifyMsg(plVaultNotifyMsg* msg)
|
||||
// It's very useful though...
|
||||
VaultAgeLinkNode accLink(cVaultLink);
|
||||
accLink.CopyTo(cur);
|
||||
if (RelVaultNode* rvnInfo = cVaultLink->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1))
|
||||
if (hsRef<RelVaultNode> rvnInfo = cVaultLink->GetChildNode(plVault::kNodeType_AgeInfo, 1))
|
||||
{
|
||||
VaultAgeInfoNode accInfo(rvnInfo);
|
||||
accInfo.CopyTo(cur->GetAgeInfo());
|
||||
rvnInfo->UnRef();
|
||||
}
|
||||
|
||||
IDoLink(fDeferredLink);
|
||||
fDeferredLink = nil;
|
||||
return true;
|
||||
|
||||
cVaultLink->UnRef();
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -778,7 +775,7 @@ void plNetLinkingMgr::IPostProcessLink( void )
|
||||
bool psnl = (info->GetAgeFilename().CompareI(kPersonalAgeFilename) == 0);
|
||||
|
||||
// Update our online status
|
||||
if (RelVaultNode* rvnInfo = VaultGetPlayerInfoNodeIncRef()) {
|
||||
if (hsRef<RelVaultNode> rvnInfo = VaultGetPlayerInfoNode()) {
|
||||
VaultPlayerInfoNode accInfo(rvnInfo);
|
||||
wchar_t ageInstName[MAX_PATH];
|
||||
plUUID ageInstGuid = *info->GetAgeInstanceGuid();
|
||||
@ -786,7 +783,6 @@ void plNetLinkingMgr::IPostProcessLink( void )
|
||||
accInfo.SetAgeInstName(ageInstName);
|
||||
accInfo.SetAgeInstUuid(ageInstGuid);
|
||||
accInfo.SetOnline(true);
|
||||
rvnInfo->UnRef();
|
||||
}
|
||||
|
||||
switch (link->GetLinkingRules()) {
|
||||
@ -797,8 +793,8 @@ void plNetLinkingMgr::IPostProcessLink( void )
|
||||
break;
|
||||
|
||||
{ // Ensure we're in the AgeOwners folder
|
||||
RelVaultNode* fldr = VaultGetAgeAgeOwnersFolderIncRef();
|
||||
RelVaultNode* info = VaultGetPlayerInfoNodeIncRef();
|
||||
hsRef<RelVaultNode> fldr = VaultGetAgeAgeOwnersFolder();
|
||||
hsRef<RelVaultNode> info = VaultGetPlayerInfoNode();
|
||||
|
||||
if (fldr && info)
|
||||
if (!fldr->IsParentOf(info->GetNodeId(), 1))
|
||||
@ -809,11 +805,6 @@ void plNetLinkingMgr::IPostProcessLink( void )
|
||||
nil,
|
||||
nil
|
||||
);
|
||||
|
||||
if (fldr)
|
||||
fldr->UnRef();
|
||||
if (info)
|
||||
info->UnRef();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -824,8 +815,8 @@ void plNetLinkingMgr::IPostProcessLink( void )
|
||||
break;
|
||||
|
||||
{ // Ensure we're in the CanVisit folder
|
||||
RelVaultNode* fldr = VaultGetAgeCanVisitFolderIncRef();
|
||||
RelVaultNode* info = VaultGetPlayerInfoNodeIncRef();
|
||||
hsRef<RelVaultNode> fldr = VaultGetAgeCanVisitFolder();
|
||||
hsRef<RelVaultNode> info = VaultGetPlayerInfoNode();
|
||||
|
||||
if (fldr && info)
|
||||
if (!fldr->IsParentOf(info->GetNodeId(), 1))
|
||||
@ -836,11 +827,6 @@ void plNetLinkingMgr::IPostProcessLink( void )
|
||||
nil,
|
||||
nil
|
||||
);
|
||||
|
||||
if (fldr)
|
||||
fldr->UnRef();
|
||||
if (info)
|
||||
info->UnRef();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -873,16 +859,15 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void)
|
||||
|
||||
#if 0
|
||||
// Appear offline until we're done linking
|
||||
if (RelVaultNode * rvnInfo = VaultGetPlayerInfoNodeIncRef()) {
|
||||
if (hsRef<RelVaultNode> rvnInfo = VaultGetPlayerInfoNode()) {
|
||||
VaultPlayerInfoNode accInfo(rvnInfo);
|
||||
accInfo.SetAgeInstName(nil);
|
||||
accInfo.SetAgeInstUuid(kNilUuid);
|
||||
accInfo.SetOnline(false);
|
||||
rvnInfo->UnRef();
|
||||
}
|
||||
#else
|
||||
// Update our online status
|
||||
if (RelVaultNode * rvnInfo = VaultGetPlayerInfoNodeIncRef()) {
|
||||
if (hsRef<RelVaultNode> rvnInfo = VaultGetPlayerInfoNode()) {
|
||||
VaultPlayerInfoNode accInfo(rvnInfo);
|
||||
wchar_t ageInstName[MAX_PATH];
|
||||
plUUID ageInstGuid = *GetAgeLink()->GetAgeInfo()->GetAgeInstanceGuid();
|
||||
@ -890,7 +875,6 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void)
|
||||
accInfo.SetAgeInstName(ageInstName);
|
||||
accInfo.SetAgeInstUuid(ageInstGuid);
|
||||
accInfo.SetOnline(true);
|
||||
rvnInfo->UnRef();
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -984,7 +968,7 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void)
|
||||
success = kLinkDeferred;
|
||||
break;
|
||||
}
|
||||
else if (RelVaultNode* linkNode = VaultGetOwnedAgeLinkIncRef(&ageInfo)) {
|
||||
else if (hsRef<RelVaultNode> linkNode = VaultGetOwnedAgeLink(&ageInfo)) {
|
||||
// We have the age in our AgesIOwnFolder. If its volatile, dump it for the new one.
|
||||
VaultAgeLinkNode linkAcc(linkNode);
|
||||
if (linkAcc.GetVolatile()) {
|
||||
@ -1035,7 +1019,6 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
linkNode->UnRef();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,10 +275,9 @@ static void PlayerInitCallback (
|
||||
// Ensure the city link has the required spawn points
|
||||
plAgeInfoStruct info;
|
||||
info.SetAgeFilename(kCityAgeFilename);
|
||||
if (RelVaultNode * rvn = VaultGetOwnedAgeLinkIncRef(&info)) {
|
||||
if (hsRef<RelVaultNode> rvn = VaultGetOwnedAgeLink(&info)) {
|
||||
VaultAgeLinkNode acc(rvn);
|
||||
acc.AddSpawnPoint(plSpawnPointInfo(kCityFerryTerminalLinkTitle, kCityFerryTerminalLinkSpawnPtName));
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
VaultProcessPlayerInbox();
|
||||
@ -1119,14 +1118,12 @@ void NetCommSetActivePlayer (//--> plNetCommActivePlayerMsg
|
||||
unsigned playerInt = 0;
|
||||
|
||||
if (s_player) {
|
||||
if (RelVaultNode* rvn = VaultGetPlayerInfoNodeIncRef()) {
|
||||
if (hsRef<RelVaultNode> rvn = VaultGetPlayerInfoNode()) {
|
||||
VaultPlayerInfoNode pInfo(rvn);
|
||||
pInfo.SetAgeInstName(nil);
|
||||
pInfo.SetAgeInstUuid(kNilUuid);
|
||||
pInfo.SetOnline(false);
|
||||
NetCliAuthVaultNodeSave(rvn, nil, nil);
|
||||
|
||||
rvn->UnRef();
|
||||
}
|
||||
|
||||
VaultCull(s_player->playerInt);
|
||||
@ -1321,10 +1318,9 @@ void NetCommUpgradeVisitorToExplorer (
|
||||
void NetCommSetCCRLevel (
|
||||
unsigned ccrLevel
|
||||
) {
|
||||
if (RelVaultNode * rvnInfo = VaultGetPlayerInfoNodeIncRef()) {
|
||||
if (hsRef<RelVaultNode> rvnInfo = VaultGetPlayerInfoNode()) {
|
||||
VaultPlayerInfoNode pInfo(rvnInfo);
|
||||
pInfo.SetCCRLevel(ccrLevel);
|
||||
rvnInfo->UnRef();
|
||||
}
|
||||
|
||||
NetCliAuthSetCCRLevel(ccrLevel);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -126,28 +126,28 @@ struct RelVaultNode : NetVaultNode {
|
||||
unsigned maxDepth
|
||||
);
|
||||
|
||||
// returns first matching node found
|
||||
RelVaultNode * GetParentNodeIncRef (
|
||||
// returns first matching node found
|
||||
hsRef<RelVaultNode> GetParentNode (
|
||||
NetVaultNode * templateNode,
|
||||
unsigned maxDepth
|
||||
);
|
||||
RelVaultNode * GetChildNodeIncRef (
|
||||
hsRef<RelVaultNode> GetChildNode (
|
||||
NetVaultNode * templateNode,
|
||||
unsigned maxDepth
|
||||
);
|
||||
RelVaultNode * GetChildNodeIncRef (
|
||||
hsRef<RelVaultNode> GetChildNode (
|
||||
unsigned nodeType,
|
||||
unsigned maxDepth
|
||||
);
|
||||
RelVaultNode * GetChildFolderNodeIncRef (
|
||||
hsRef<RelVaultNode> GetChildFolderNode (
|
||||
unsigned folderType,
|
||||
unsigned maxDepth
|
||||
);
|
||||
RelVaultNode * GetChildPlayerInfoListNodeIncRef (
|
||||
hsRef<RelVaultNode> GetChildPlayerInfoListNode (
|
||||
unsigned folderType,
|
||||
unsigned maxDepth
|
||||
);
|
||||
RelVaultNode * GetChildAgeInfoListNodeIncRef (
|
||||
hsRef<RelVaultNode> GetChildAgeInfoListNode (
|
||||
unsigned folderType,
|
||||
unsigned maxDepth
|
||||
);
|
||||
@ -183,7 +183,7 @@ struct RelVaultNode : NetVaultNode {
|
||||
void PrintTree (FStateDump dumpProc, unsigned level);
|
||||
|
||||
// AgeInfoNode-specific (and it checks!)
|
||||
RelVaultNode * GetParentAgeLinkIncRef ();
|
||||
hsRef<RelVaultNode> GetParentAgeLink ();
|
||||
};
|
||||
|
||||
|
||||
@ -204,12 +204,9 @@ void VaultUpdate ();
|
||||
*
|
||||
***/
|
||||
|
||||
RelVaultNode * VaultGetNodeIncRef (
|
||||
unsigned nodeId
|
||||
);
|
||||
RelVaultNode * VaultGetNodeIncRef (
|
||||
NetVaultNode * templateNode
|
||||
);
|
||||
hsRef<RelVaultNode> VaultGetNode(unsigned nodeId);
|
||||
hsRef<RelVaultNode> VaultGetNode(NetVaultNode * templateNode);
|
||||
|
||||
// VaultAddChildNode will download the child node if necessary
|
||||
// the parent exists locally before making the callback.
|
||||
typedef void (*FVaultAddChildNodeCallback)(
|
||||
@ -272,11 +269,11 @@ void VaultCreateNode ( // non-blocking
|
||||
void * state,
|
||||
void * param
|
||||
);
|
||||
RelVaultNode * VaultCreateNodeAndWaitIncRef ( // block until completion. returns node. nil --> failure
|
||||
hsRef<RelVaultNode> VaultCreateNodeAndWait ( // block until completion. returns node. nil --> failure
|
||||
plVault::NodeTypes nodeType,
|
||||
ENetError * result
|
||||
);
|
||||
RelVaultNode * VaultCreateNodeAndWaitIncRef ( // block until completion. returns node. nil --> failure
|
||||
hsRef<RelVaultNode> VaultCreateNodeAndWait ( // block until completion. returns node. nil --> failure
|
||||
NetVaultNode * templateNode,
|
||||
ENetError * result
|
||||
);
|
||||
@ -303,7 +300,7 @@ void VaultLocalFindNodes (
|
||||
NetVaultNode * templateNode,
|
||||
ARRAY(unsigned) * nodeIds
|
||||
);
|
||||
void VaultFetchNodesAndWait ( // Use VaultGetNodeIncRef to access the fetched nodes
|
||||
void VaultFetchNodesAndWait ( // Use VaultGetNode to access the fetched nodes
|
||||
const unsigned nodeIds[],
|
||||
unsigned count,
|
||||
bool force = false
|
||||
@ -330,32 +327,32 @@ void VaultInitAge (
|
||||
*
|
||||
***/
|
||||
|
||||
unsigned VaultGetPlayerId ();
|
||||
RelVaultNode * VaultGetPlayerNodeIncRef ();
|
||||
RelVaultNode * VaultGetPlayerInfoNodeIncRef ();
|
||||
RelVaultNode * VaultGetAvatarOutfitFolderIncRef ();
|
||||
RelVaultNode * VaultGetAvatarClosetFolderIncRef ();
|
||||
bool VaultGetLinkToMyNeighborhood (plAgeLinkStruct * link);
|
||||
bool VaultGetLinkToMyPersonalAge (plAgeLinkStruct * link);
|
||||
bool VaultGetLinkToCity (plAgeLinkStruct * link);
|
||||
RelVaultNode * VaultGetAgesIOwnFolderIncRef ();
|
||||
RelVaultNode * VaultGetAgesICanVisitFolderIncRef ();
|
||||
RelVaultNode * VaultGetPlayerInboxFolderIncRef ();
|
||||
RelVaultNode * VaultGetOwnedAgeLinkIncRef (const plAgeInfoStruct * info);
|
||||
RelVaultNode * VaultGetOwnedAgeInfoIncRef (const plAgeInfoStruct * info);
|
||||
bool VaultGetOwnedAgeLink (const plAgeInfoStruct * info, plAgeLinkStruct * link);
|
||||
bool VaultAddOwnedAgeSpawnPoint (const plUUID& ageInstId, const plSpawnPointInfo & spawnPt);
|
||||
bool VaultSetOwnedAgePublicAndWait (const plAgeInfoStruct * info, bool publicOrNot);
|
||||
RelVaultNode * VaultGetVisitAgeLinkIncRef (const plAgeInfoStruct * info);
|
||||
bool VaultGetVisitAgeLink (const plAgeInfoStruct * info, class plAgeLinkStruct * link);
|
||||
bool VaultRegisterOwnedAgeAndWait (const plAgeLinkStruct * link);
|
||||
void VaultRegisterOwnedAge(const plAgeLinkStruct* link);
|
||||
bool VaultRegisterVisitAgeAndWait (const plAgeLinkStruct * link);
|
||||
void VaultRegisterVisitAge (const plAgeLinkStruct* link);
|
||||
bool VaultUnregisterOwnedAgeAndWait (const plAgeInfoStruct * info);
|
||||
bool VaultUnregisterVisitAgeAndWait (const plAgeInfoStruct * info);
|
||||
RelVaultNode * VaultFindChronicleEntryIncRef (const wchar_t entryName[], int entryType = -1);
|
||||
bool VaultHasChronicleEntry (const wchar_t entryName[], int entryType = -1);
|
||||
unsigned VaultGetPlayerId();
|
||||
hsRef<RelVaultNode> VaultGetPlayerNode();
|
||||
hsRef<RelVaultNode> VaultGetPlayerInfoNode();
|
||||
hsRef<RelVaultNode> VaultGetAvatarOutfitFolder();
|
||||
hsRef<RelVaultNode> VaultGetAvatarClosetFolder();
|
||||
bool VaultGetLinkToMyNeighborhood(plAgeLinkStruct * link);
|
||||
bool VaultGetLinkToMyPersonalAge(plAgeLinkStruct * link);
|
||||
bool VaultGetLinkToCity(plAgeLinkStruct * link);
|
||||
hsRef<RelVaultNode> VaultGetAgesIOwnFolder();
|
||||
hsRef<RelVaultNode> VaultGetAgesICanVisitFolder();
|
||||
hsRef<RelVaultNode> VaultGetPlayerInboxFolder();
|
||||
hsRef<RelVaultNode> VaultGetOwnedAgeLink(const plAgeInfoStruct * info);
|
||||
hsRef<RelVaultNode> VaultGetOwnedAgeInfo(const plAgeInfoStruct * info);
|
||||
bool VaultGetOwnedAgeLink(const plAgeInfoStruct * info, plAgeLinkStruct * link);
|
||||
bool VaultAddOwnedAgeSpawnPoint(const plUUID& ageInstId, const plSpawnPointInfo & spawnPt);
|
||||
bool VaultSetOwnedAgePublicAndWait(const plAgeInfoStruct * info, bool publicOrNot);
|
||||
hsRef<RelVaultNode> VaultGetVisitAgeLink(const plAgeInfoStruct * info);
|
||||
bool VaultGetVisitAgeLink(const plAgeInfoStruct * info, class plAgeLinkStruct * link);
|
||||
bool VaultRegisterOwnedAgeAndWait(const plAgeLinkStruct * link);
|
||||
void VaultRegisterOwnedAge(const plAgeLinkStruct* link);
|
||||
bool VaultRegisterVisitAgeAndWait(const plAgeLinkStruct * link);
|
||||
void VaultRegisterVisitAge(const plAgeLinkStruct* link);
|
||||
bool VaultUnregisterOwnedAgeAndWait(const plAgeInfoStruct * info);
|
||||
bool VaultUnregisterVisitAgeAndWait(const plAgeInfoStruct * info);
|
||||
hsRef<RelVaultNode> VaultFindChronicleEntry(const wchar_t entryName[], int entryType = -1);
|
||||
bool VaultHasChronicleEntry(const wchar_t entryName[], int entryType = -1);
|
||||
// if entry of same name and type already exists, value is updated
|
||||
void VaultAddChronicleEntryAndWait (
|
||||
const wchar_t entryName[],
|
||||
@ -390,32 +387,32 @@ void VaultProcessPlayerInbox ();
|
||||
|
||||
#define DEFAULT_DEVICE_INBOX L"DevInbox"
|
||||
|
||||
RelVaultNode * VaultGetAgeNodeIncRef ();
|
||||
RelVaultNode * VaultGetAgeInfoNodeIncRef ();
|
||||
RelVaultNode * VaultGetAgeChronicleFolderIncRef ();
|
||||
RelVaultNode * VaultGetAgeDevicesFolderIncRef ();
|
||||
RelVaultNode * VaultGetAgeSubAgesFolderIncRef ();
|
||||
RelVaultNode * VaultGetAgeChildAgesFolderIncRef ();
|
||||
RelVaultNode * VaultGetAgeAgeOwnersFolderIncRef ();
|
||||
RelVaultNode * VaultGetAgeCanVisitFolderIncRef ();
|
||||
RelVaultNode * VaultGetAgePeopleIKnowAboutFolderIncRef ();
|
||||
RelVaultNode * VaultGetAgePublicAgesFolderIncRef ();
|
||||
RelVaultNode * VaultAgeGetBookshelfFolderIncRef ();
|
||||
RelVaultNode * VaultFindAgeSubAgeLinkIncRef (const plAgeInfoStruct * info);
|
||||
RelVaultNode * VaultFindAgeChildAgeLinkIncRef (const plAgeInfoStruct * info);
|
||||
RelVaultNode * VaultFindAgeChronicleEntryIncRef (const wchar_t entryName[], int entryType = -1);
|
||||
hsRef<RelVaultNode> VaultGetAgeNode();
|
||||
hsRef<RelVaultNode> VaultGetAgeInfoNode();
|
||||
hsRef<RelVaultNode> VaultGetAgeChronicleFolder();
|
||||
hsRef<RelVaultNode> VaultGetAgeDevicesFolder();
|
||||
hsRef<RelVaultNode> VaultGetAgeSubAgesFolder();
|
||||
hsRef<RelVaultNode> VaultGetAgeChildAgesFolder();
|
||||
hsRef<RelVaultNode> VaultGetAgeAgeOwnersFolder();
|
||||
hsRef<RelVaultNode> VaultGetAgeCanVisitFolder();
|
||||
hsRef<RelVaultNode> VaultGetAgePeopleIKnowAboutFolder();
|
||||
hsRef<RelVaultNode> VaultGetAgePublicAgesFolder();
|
||||
hsRef<RelVaultNode> VaultAgeGetBookshelfFolder();
|
||||
hsRef<RelVaultNode> VaultFindAgeSubAgeLink(const plAgeInfoStruct * info);
|
||||
hsRef<RelVaultNode> VaultFindAgeChildAgeLink(const plAgeInfoStruct * info);
|
||||
hsRef<RelVaultNode> VaultFindAgeChronicleEntry(const wchar_t entryName[], int entryType = -1);
|
||||
// if entry of same name and type already exists, value is updated
|
||||
void VaultAddAgeChronicleEntry (
|
||||
const wchar_t entryName[],
|
||||
int entryType,
|
||||
const wchar_t entryValue[]
|
||||
);
|
||||
RelVaultNode * VaultAgeAddDeviceAndWaitIncRef (const wchar_t deviceName[]); // blocks until completion
|
||||
hsRef<RelVaultNode> VaultAgeAddDeviceAndWait(const wchar_t deviceName[]); // blocks until completion
|
||||
void VaultAgeRemoveDevice (const wchar_t deviceName[]);
|
||||
bool VaultAgeHasDevice (const wchar_t deviceName[]);
|
||||
RelVaultNode * VaultAgeGetDeviceIncRef (const wchar_t deviceName[]);
|
||||
RelVaultNode * VaultAgeSetDeviceInboxAndWaitIncRef (const wchar_t deviceName[], const wchar_t inboxName[]); // blocks until completion
|
||||
RelVaultNode * VaultAgeGetDeviceInboxIncRef (const wchar_t deviceName[]);
|
||||
hsRef<RelVaultNode> VaultAgeGetDevice(const wchar_t deviceName[]);
|
||||
hsRef<RelVaultNode> VaultAgeSetDeviceInboxAndWait(const wchar_t deviceName[], const wchar_t inboxName[]); // blocks until completion
|
||||
hsRef<RelVaultNode> VaultAgeGetDeviceInbox(const wchar_t deviceName[]);
|
||||
void VaultClearDeviceInboxMap ();
|
||||
|
||||
bool VaultAgeGetAgeSDL (class plStateDataRecord * out);
|
||||
@ -423,7 +420,7 @@ void VaultAgeUpdateAgeSDL (const class plStateDataRecord * rec);
|
||||
|
||||
unsigned VaultAgeGetAgeTime ();
|
||||
|
||||
RelVaultNode * VaultGetSubAgeLinkIncRef (const plAgeInfoStruct * info);
|
||||
hsRef<RelVaultNode> VaultGetSubAgeLink(const plAgeInfoStruct * info);
|
||||
bool VaultAgeGetSubAgeLink (
|
||||
const plAgeInfoStruct * info,
|
||||
plAgeLinkStruct * link
|
||||
@ -435,7 +432,7 @@ bool VaultAgeFindOrCreateSubAgeLinkAndWait (
|
||||
);
|
||||
bool VaultAgeFindOrCreateSubAgeLink(const plAgeInfoStruct* info, plAgeLinkStruct* link, const plUUID& arentUuid);
|
||||
bool VaultAgeFindOrCreateChildAgeLinkAndWait (
|
||||
const wchar_t parentAgeName[], // nil --> current age, non-nil --> owned age by given name
|
||||
const wchar_t parentAgeName[], // nil --> current age, non-nil --> owned age by given name
|
||||
const plAgeInfoStruct * info,
|
||||
plAgeLinkStruct * link
|
||||
);
|
||||
@ -494,7 +491,7 @@ void VaultCull (
|
||||
*
|
||||
***/
|
||||
|
||||
RelVaultNode * VaultGetSystemNodeIncRef ();
|
||||
RelVaultNode * VaultGetGlobalInboxIncRef ();
|
||||
hsRef<RelVaultNode> VaultGetSystemNode();
|
||||
hsRef<RelVaultNode> VaultGetGlobalInbox();
|
||||
|
||||
#endif // def CLIENT
|
||||
|
@ -435,14 +435,12 @@ struct MatchesSpawnPointName
|
||||
//============================================================================
|
||||
#ifdef CLIENT
|
||||
bool VaultAgeLinkNode::CopyTo (plAgeLinkStruct * link) {
|
||||
if (RelVaultNode * me = VaultGetNodeIncRef(base->GetNodeId())) {
|
||||
if (RelVaultNode * info = me->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1)) {
|
||||
if (hsRef<RelVaultNode> me = VaultGetNode(base->GetNodeId())) {
|
||||
if (hsRef<RelVaultNode> info = me->GetChildNode(plVault::kNodeType_AgeInfo, 1)) {
|
||||
VaultAgeInfoNode access(info);
|
||||
access.CopyTo(link->GetAgeInfo());
|
||||
me->UnRef();
|
||||
return true;
|
||||
}
|
||||
me->UnRef();
|
||||
}
|
||||
link->Clear();
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user