mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Fix plVault.
This means that everything that doesn't depend on non-portable code is able to compile.
This commit is contained in:
@ -285,7 +285,7 @@ static void VaultNodeFound (
|
|||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
static void VaultNodeAddedDownloadCallback(ENetError result, void * param) {
|
static void VaultNodeAddedDownloadCallback(ENetError result, void * param) {
|
||||||
unsigned childId = (unsigned)param;
|
unsigned childId = (unsigned)((uintptr_t)param);
|
||||||
|
|
||||||
INotifyAfterDownload* notify = s_notifyAfterDownload.Find(childId);
|
INotifyAfterDownload* notify = s_notifyAfterDownload.Find(childId);
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ static void VaultNodeAddedDownloadCallback(ENetError result, void * param) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
static void __cdecl LogDumpProc (
|
static void CDECL LogDumpProc (
|
||||||
void * ,
|
void * ,
|
||||||
const wchar_t fmt[],
|
const wchar_t fmt[],
|
||||||
...
|
...
|
||||||
@ -1182,7 +1182,7 @@ RelVaultNode * RelVaultNode::GetParentNodeIncRef (
|
|||||||
unsigned maxDepth
|
unsigned maxDepth
|
||||||
) {
|
) {
|
||||||
if (maxDepth == 0)
|
if (maxDepth == 0)
|
||||||
return false;
|
return nil;
|
||||||
|
|
||||||
RelVaultNodeLink * link;
|
RelVaultNodeLink * link;
|
||||||
link = state->parents.Head();
|
link = state->parents.Head();
|
||||||
@ -1208,7 +1208,7 @@ RelVaultNode * RelVaultNode::GetChildNodeIncRef (
|
|||||||
unsigned maxDepth
|
unsigned maxDepth
|
||||||
) {
|
) {
|
||||||
if (maxDepth == 0)
|
if (maxDepth == 0)
|
||||||
return false;
|
return nil;
|
||||||
|
|
||||||
RelVaultNodeLink * link;
|
RelVaultNodeLink * link;
|
||||||
link = state->children.Head();
|
link = state->children.Head();
|
||||||
@ -2831,7 +2831,7 @@ namespace _VaultRegisterOwnedAge {
|
|||||||
void _CreateAgeLinkNode(ENetError result, void* state, void* param, RelVaultNode* node) {
|
void _CreateAgeLinkNode(ENetError result, void* state, void* param, RelVaultNode* node) {
|
||||||
if (IS_NET_ERROR(result)) {
|
if (IS_NET_ERROR(result)) {
|
||||||
LogMsg(kLogError, "VaultRegisterOwnedAge: Failed to create AgeLink (async)");
|
LogMsg(kLogError, "VaultRegisterOwnedAge: Failed to create AgeLink (async)");
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2846,10 +2846,10 @@ namespace _VaultRegisterOwnedAge {
|
|||||||
RelVaultNode* agesIOwn = VaultGetAgesIOwnFolderIncRef();
|
RelVaultNode* agesIOwn = VaultGetAgesIOwnFolderIncRef();
|
||||||
RelVaultNode* plyrInfo = VaultGetPlayerInfoNodeIncRef();
|
RelVaultNode* plyrInfo = VaultGetPlayerInfoNodeIncRef();
|
||||||
VaultAddChildNode(agesIOwn->nodeId, node->nodeId, 0, (FVaultAddChildNodeCallback)_AddAgeLinkNode, nil);
|
VaultAddChildNode(agesIOwn->nodeId, node->nodeId, 0, (FVaultAddChildNodeCallback)_AddAgeLinkNode, nil);
|
||||||
VaultAddChildNode(node->nodeId, (uint32_t)p->fAgeInfoId, 0, (FVaultAddChildNodeCallback)_AddAgeInfoNode, nil);
|
VaultAddChildNode(node->nodeId, (uint32_t)((uintptr_t)p->fAgeInfoId), 0, (FVaultAddChildNodeCallback)_AddAgeInfoNode, nil);
|
||||||
|
|
||||||
// Add our PlayerInfo to important places
|
// Add our PlayerInfo to important places
|
||||||
if (RelVaultNode* rvnAgeInfo = VaultGetNodeIncRef((uint32_t)p->fAgeInfoId)) {
|
if (RelVaultNode* rvnAgeInfo = VaultGetNodeIncRef((uint32_t)((uintptr_t)p->fAgeInfoId))) {
|
||||||
if (RelVaultNode* rvnAgeOwners = rvnAgeInfo->GetChildPlayerInfoListNodeIncRef(plVault::kAgeOwnersFolder, 1)) {
|
if (RelVaultNode* rvnAgeOwners = rvnAgeInfo->GetChildPlayerInfoListNodeIncRef(plVault::kAgeOwnersFolder, 1)) {
|
||||||
VaultAddChildNode(rvnAgeOwners->nodeId, plyrInfo->nodeId, 0, (FVaultAddChildNodeCallback)_AddPlayerInfoNode, nil);
|
VaultAddChildNode(rvnAgeOwners->nodeId, plyrInfo->nodeId, 0, (FVaultAddChildNodeCallback)_AddPlayerInfoNode, nil);
|
||||||
rvnAgeOwners->DecRef();
|
rvnAgeOwners->DecRef();
|
||||||
@ -2874,7 +2874,7 @@ namespace _VaultRegisterOwnedAge {
|
|||||||
void _DownloadCallback(ENetError result, void* param) {
|
void _DownloadCallback(ENetError result, void* param) {
|
||||||
if (IS_NET_ERROR(result)) {
|
if (IS_NET_ERROR(result)) {
|
||||||
LogMsg(kLogError, "VaultRegisterOwnedAge: Failed to download age vault (async)");
|
LogMsg(kLogError, "VaultRegisterOwnedAge: Failed to download age vault (async)");
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
} else
|
} else
|
||||||
VaultCreateNode(plVault::kNodeType_AgeLink, (FVaultCreateNodeCallback)_CreateAgeLinkNode, nil, param);
|
VaultCreateNode(plVault::kNodeType_AgeLink, (FVaultCreateNodeCallback)_CreateAgeLinkNode, nil, param);
|
||||||
}
|
}
|
||||||
@ -3190,12 +3190,12 @@ namespace _VaultRegisterVisitAge {
|
|||||||
void _CreateAgeLinkNode(ENetError result, void* state, void* param, RelVaultNode* node) {
|
void _CreateAgeLinkNode(ENetError result, void* state, void* param, RelVaultNode* node) {
|
||||||
if (IS_NET_ERROR(result)) {
|
if (IS_NET_ERROR(result)) {
|
||||||
LogMsg(kLogError, "RegisterVisitAge: Failed to create AgeLink (async)");
|
LogMsg(kLogError, "RegisterVisitAge: Failed to create AgeLink (async)");
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_Params* p = (_Params*)param;
|
_Params* p = (_Params*)param;
|
||||||
RelVaultNode* ageInfo = VaultGetNodeIncRef((uint32_t)p->fAgeInfoId);
|
RelVaultNode* ageInfo = VaultGetNodeIncRef((uint32_t)((uintptr_t)p->fAgeInfoId));
|
||||||
|
|
||||||
// Add ourselves to the Can Visit folder of the age
|
// Add ourselves to the Can Visit folder of the age
|
||||||
if (RelVaultNode * playerInfo = VaultGetPlayerInfoNodeIncRef()) {
|
if (RelVaultNode * playerInfo = VaultGetPlayerInfoNodeIncRef()) {
|
||||||
@ -3225,13 +3225,13 @@ namespace _VaultRegisterVisitAge {
|
|||||||
msg->Send();
|
msg->Send();
|
||||||
|
|
||||||
//Don't leak memory
|
//Don't leak memory
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _DownloadCallback(ENetError result, void* param) {
|
void _DownloadCallback(ENetError result, void* param) {
|
||||||
if (IS_NET_ERROR(result)) {
|
if (IS_NET_ERROR(result)) {
|
||||||
LogMsg(kLogError, "RegisterVisitAge: Failed to download age vault (async)");
|
LogMsg(kLogError, "RegisterVisitAge: Failed to download age vault (async)");
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3242,7 +3242,7 @@ namespace _VaultRegisterVisitAge {
|
|||||||
void _InitAgeCallback(ENetError result, void* state, void* param, uint32_t ageVaultId, uint32_t ageInfoId) {
|
void _InitAgeCallback(ENetError result, void* state, void* param, uint32_t ageVaultId, uint32_t ageInfoId) {
|
||||||
if (IS_NET_ERROR(result)) {
|
if (IS_NET_ERROR(result)) {
|
||||||
LogMsg(kLogError, "RegisterVisitAge: Failed to init age vault (async)");
|
LogMsg(kLogError, "RegisterVisitAge: Failed to init age vault (async)");
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4422,7 +4422,7 @@ namespace _VaultCreateSubAge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add the children to the right places
|
// Add the children to the right places
|
||||||
VaultAddChildNode(node->nodeId, (uint32_t)param, 0, nil, nil);
|
VaultAddChildNode(node->nodeId, (uint32_t)((uintptr_t)param), 0, nil, nil);
|
||||||
if (RelVaultNode* saFldr = VaultGetAgeSubAgesFolderIncRef()) {
|
if (RelVaultNode* saFldr = VaultGetAgeSubAgesFolderIncRef()) {
|
||||||
VaultAddChildNode(saFldr->nodeId, node->nodeId, 0, nil, nil);
|
VaultAddChildNode(saFldr->nodeId, node->nodeId, 0, nil, nil);
|
||||||
saFldr->DecRef();
|
saFldr->DecRef();
|
||||||
@ -4782,15 +4782,15 @@ namespace _VaultCreateChildAge {
|
|||||||
void _CreateNodeCallback(ENetError result, void* state, void* param, RelVaultNode* node) {
|
void _CreateNodeCallback(ENetError result, void* state, void* param, RelVaultNode* node) {
|
||||||
if (IS_NET_ERROR(result)) {
|
if (IS_NET_ERROR(result)) {
|
||||||
LogMsg(kLogError, "CreateChildAge: Failed to create AgeLink (async)");
|
LogMsg(kLogError, "CreateChildAge: Failed to create AgeLink (async)");
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_Params* p = (_Params*)param;
|
_Params* p = (_Params*)param;
|
||||||
|
|
||||||
// Add the children to the right places
|
// Add the children to the right places
|
||||||
VaultAddChildNode(node->nodeId, (uint32_t)p->fAgeInfoId, 0, nil, nil);
|
VaultAddChildNode(node->nodeId, (uint32_t)((uintptr_t)p->fAgeInfoId), 0, nil, nil);
|
||||||
VaultAddChildNode((uint32_t)p->fChildAgesFldr, node->nodeId, 0, nil, nil);
|
VaultAddChildNode((uint32_t)((uintptr_t)p->fChildAgesFldr), node->nodeId, 0, nil, nil);
|
||||||
|
|
||||||
// Send the VaultNotify that the plNetLinkingMgr wants...
|
// Send the VaultNotify that the plNetLinkingMgr wants...
|
||||||
plVaultNotifyMsg * msg = NEWZERO(plVaultNotifyMsg);
|
plVaultNotifyMsg * msg = NEWZERO(plVaultNotifyMsg);
|
||||||
@ -4799,13 +4799,13 @@ namespace _VaultCreateChildAge {
|
|||||||
msg->GetArgs()->AddInt(plNetCommon::VaultTaskArgs::kAgeLinkNode, node->nodeId);
|
msg->GetArgs()->AddInt(plNetCommon::VaultTaskArgs::kAgeLinkNode, node->nodeId);
|
||||||
msg->Send();
|
msg->Send();
|
||||||
|
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _DownloadCallback(ENetError result, void* param) {
|
void _DownloadCallback(ENetError result, void* param) {
|
||||||
if (IS_NET_ERROR(result)) {
|
if (IS_NET_ERROR(result)) {
|
||||||
LogMsg(kLogError, "CreateChildAge: Failed to download age vault (async)");
|
LogMsg(kLogError, "CreateChildAge: Failed to download age vault (async)");
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4820,7 +4820,7 @@ namespace _VaultCreateChildAge {
|
|||||||
void _InitAgeCallback(ENetError result, void* state, void* param, uint32_t ageVaultId, uint32_t ageInfoId) {
|
void _InitAgeCallback(ENetError result, void* state, void* param, uint32_t ageVaultId, uint32_t ageInfoId) {
|
||||||
if (IS_NET_ERROR(result)) {
|
if (IS_NET_ERROR(result)) {
|
||||||
LogMsg(kLogError, "CreateChildAge: Failed to init age (async)");
|
LogMsg(kLogError, "CreateChildAge: Failed to init age (async)");
|
||||||
delete param;
|
delete (_Params*)param;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4888,7 +4888,7 @@ uint8_t VaultAgeFindOrCreateChildAgeLink(
|
|||||||
rvnAgeLink->DecRef();
|
rvnAgeLink->DecRef();
|
||||||
rvnAgeInfo->DecRef();
|
rvnAgeInfo->DecRef();
|
||||||
|
|
||||||
retval = TRUE;
|
retval = true;
|
||||||
} else {
|
} else {
|
||||||
_Params* p = new _Params;
|
_Params* p = new _Params;
|
||||||
p->fChildAgesFldr = (void*)rvnChildAges->nodeId;
|
p->fChildAgesFldr = (void*)rvnChildAges->nodeId;
|
||||||
@ -4900,7 +4900,7 @@ uint8_t VaultAgeFindOrCreateChildAgeLink(
|
|||||||
nil,
|
nil,
|
||||||
p
|
p
|
||||||
);
|
);
|
||||||
retval = FALSE;
|
retval = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp->DecRef();
|
temp->DecRef();
|
||||||
|
@ -466,7 +466,8 @@ bool VaultTextNoteNode::GetVisitInfo (plAgeInfoStruct * info) {
|
|||||||
if (StrLen(token) > 0) {
|
if (StrLen(token) > 0) {
|
||||||
Uuid guid;
|
Uuid guid;
|
||||||
GuidFromString(token, &guid);
|
GuidFromString(token, &guid);
|
||||||
info->SetAgeInstanceGuid(&plUUID(guid));
|
plUUID uuid(guid);
|
||||||
|
info->SetAgeInstanceGuid(&uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user