mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Add proper member access control to NetVaultNode
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -67,7 +67,7 @@ uint64_t GetNodeVolatileFields(NetVaultNode* node) {
|
||||
unsigned index = 0;
|
||||
|
||||
while (volatileFieldList[index].nodeType != 0) {
|
||||
if (node->nodeType == volatileFieldList[index].nodeType) {
|
||||
if (node->GetNodeType() == volatileFieldList[index].nodeType) {
|
||||
volatileFields |= volatileFieldList[index].volatileFields;
|
||||
break;
|
||||
}
|
||||
@ -78,204 +78,6 @@ uint64_t GetNodeVolatileFields(NetVaultNode* node) {
|
||||
return volatileFields;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* NetVaultNodeAccess
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
NetVaultNodeAccess::NetVaultNodeAccess (NetVaultNode * node)
|
||||
: base(node)
|
||||
, fieldFlags(node->fieldFlags)
|
||||
, dirtyFlags(node->dirtyFlags)
|
||||
{ }
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultPlayerNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultPlayerNode::VaultPlayerNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, playerName(node->istring64_1)
|
||||
, avatarShapeName(node->string64_1)
|
||||
, disabled(node->int32_1)
|
||||
, explorer(node->int32_2)
|
||||
, onlineTime(node->uint32_1)
|
||||
, accountUuid(node->uuid_1)
|
||||
, inviteUuid(node->uuid_2)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerNode::SetPlayerName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kPlayerName, base, &playerName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerNode::SetAvatarShapeName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kAvatarShapeName, base, &avatarShapeName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerNode::SetDisabled (int v) {
|
||||
IVaultNodeSetValue(kDisabled, base, &disabled, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerNode::SetOnlineTime (unsigned v) {
|
||||
IVaultNodeSetValue(kOnlineTime, base, &onlineTime, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerNode::SetAccountUuid (const plUUID& v) {
|
||||
IVaultNodeSetValue(kAccountUuid, base, &accountUuid, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerNode::SetInviteUuid (const plUUID& v) {
|
||||
IVaultNodeSetValue(kInviteUuid, base, &inviteUuid, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerNode::SetExplorer (int v) {
|
||||
IVaultNodeSetValue(kExplorer, base, &explorer, v);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultPlayerInfoNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultPlayerInfoNode::VaultPlayerInfoNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, playerId(node->uint32_1)
|
||||
, playerName(node->istring64_1)
|
||||
, ageInstName(node->string64_1)
|
||||
, ageInstUuid(node->uuid_1)
|
||||
, online(node->int32_1)
|
||||
, ccrLevel(node->int32_2)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerInfoNode::SetPlayerId (unsigned v) {
|
||||
IVaultNodeSetValue(kPlayerId, base, &playerId, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerInfoNode::SetPlayerName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kPlayerName, base, &playerName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerInfoNode::SetAgeInstName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kAgeInstName, base, &ageInstName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerInfoNode::SetAgeInstUuid (const plUUID& v) {
|
||||
IVaultNodeSetValue(kAgeInstUuid, base, &ageInstUuid, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerInfoNode::SetOnline (int v) {
|
||||
IVaultNodeSetValue(kOnline, base, &online, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultPlayerInfoNode::SetCCRLevel (int v) {
|
||||
IVaultNodeSetValue(kCCRLevel, base, &ccrLevel, v);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultFolderNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultFolderNode::VaultFolderNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, folderType(node->int32_1)
|
||||
, folderName(node->string64_1)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultFolderNode::SetFolderName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kFolderName, base, &folderName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultFolderNode::SetFolderType (int v) {
|
||||
IVaultNodeSetValue(kFolderType, base, &folderType, v);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultPlayerInfoListNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultPlayerInfoListNode::VaultPlayerInfoListNode (NetVaultNode * node)
|
||||
: VaultFolderNode(node)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultAgeInfoListNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultAgeInfoListNode::VaultAgeInfoListNode (NetVaultNode * node)
|
||||
: VaultFolderNode(node)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultChronicleNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultChronicleNode::VaultChronicleNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, entryType(node->int32_1)
|
||||
, entryName(node->string64_1)
|
||||
, entryValue(node->text_1)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultChronicleNode::SetEntryType (int v) {
|
||||
IVaultNodeSetValue(kEntryType, base, &entryType, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultChronicleNode::SetEntryName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kEntryName, base, &entryName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultChronicleNode::SetEntryValue (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kEntryValue, base, &entryValue, v, (unsigned)-1);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@ -283,36 +85,6 @@ void VaultChronicleNode::SetEntryValue (const wchar_t v[]) {
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultTextNoteNode::VaultTextNoteNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, noteType(node->int32_1)
|
||||
, noteSubType(node->int32_2)
|
||||
, noteTitle(node->string64_1)
|
||||
, noteText(node->text_1)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultTextNoteNode::SetNoteType (int v) {
|
||||
IVaultNodeSetValue(kNoteType, base, ¬eType, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultTextNoteNode::SetNoteSubType (int v) {
|
||||
IVaultNodeSetValue(kNoteSubType, base, ¬eSubType, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultTextNoteNode::SetNoteTitle (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kNoteTitle, base, ¬eTitle, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultTextNoteNode::SetNoteText (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kNoteText, base, ¬eText, v, (unsigned)-1);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
enum EAgeInfoFields {
|
||||
kAgeFilename,
|
||||
@ -415,7 +187,7 @@ void VaultTextNoteNode::SetVisitInfo (const plAgeInfoStruct & info) {
|
||||
bool VaultTextNoteNode::GetVisitInfo (plAgeInfoStruct * info) {
|
||||
|
||||
wchar_t * mem;
|
||||
const wchar_t * str = mem = StrDup(noteText);
|
||||
const wchar_t * str = mem = StrDup(GetNoteText());
|
||||
|
||||
for (unsigned i = 0; i < kNumAgeInfoFields; ++i) {
|
||||
|
||||
@ -487,9 +259,9 @@ bool VaultTextNoteNode::GetVisitInfo (plAgeInfoStruct * info) {
|
||||
break;
|
||||
|
||||
DEFAULT_FATAL(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
free(mem);
|
||||
return true;
|
||||
}
|
||||
@ -501,42 +273,22 @@ bool VaultTextNoteNode::GetVisitInfo (plAgeInfoStruct * info) {
|
||||
* VaultSDLNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultSDLNode::VaultSDLNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, sdlIdent(node->int32_1)
|
||||
, sdlName(node->string64_1)
|
||||
, sdlData(node->blob_1)
|
||||
, sdlDataLen(node->blob_1Length)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultSDLNode::SetSdlIdent (int v) {
|
||||
IVaultNodeSetValue(kSDLIdent, base, &sdlIdent, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultSDLNode::SetSdlName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kSDLName, base, &sdlName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
#ifdef CLIENT
|
||||
bool VaultSDLNode::GetStateDataRecord (plStateDataRecord * rec, unsigned readOptions) {
|
||||
if (!sdlDataLen || !sdlData)
|
||||
if (!GetSDLDataLength() || !GetSDLData())
|
||||
return false;
|
||||
|
||||
hsRAMStream ram;
|
||||
ram.Write(sdlDataLen, sdlData);
|
||||
ram.Write(GetSDLDataLength(), GetSDLData());
|
||||
ram.Rewind();
|
||||
|
||||
|
||||
plString sdlRecName;
|
||||
int sdlRecVersion;
|
||||
if (!plStateDataRecord::ReadStreamHeader(&ram, &sdlRecName, &sdlRecVersion))
|
||||
return false;
|
||||
|
||||
|
||||
rec->SetDescriptor(sdlRecName, sdlRecVersion);
|
||||
|
||||
// Note: Setting from default here results in a bug causing age SDL to
|
||||
@ -562,15 +314,13 @@ void VaultSDLNode::SetStateDataRecord (const plStateDataRecord * rec, unsigned w
|
||||
rec->WriteStreamHeader(&ram);
|
||||
rec->Write(&ram, 0, writeOptions);
|
||||
ram.Rewind();
|
||||
|
||||
|
||||
unsigned bytes = ram.GetEOF();
|
||||
uint8_t * buf = nil;
|
||||
buf = (uint8_t *)malloc(bytes);
|
||||
|
||||
ram.CopyToMem(buf);
|
||||
|
||||
IVaultNodeSetBlob(kSDLData, base, &sdlData, &sdlDataLen, buf, bytes);
|
||||
|
||||
ram.CopyToMem(buf);
|
||||
SetSDLData(buf, bytes);
|
||||
free(buf);
|
||||
}
|
||||
#endif // def CLIENT
|
||||
@ -585,7 +335,7 @@ void VaultSDLNode::InitStateDataRecord (const wchar_t sdlRecName[], unsigned wri
|
||||
if (exists)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
char aStr[MAX_PATH];
|
||||
StrToAnsi(aStr, sdlRecName, arrsize(aStr));
|
||||
if (plStateDescriptor * des = plSDLMgr::GetInstance()->FindDescriptor(aStr, plSDL::kLatestVersion)) {
|
||||
@ -603,31 +353,6 @@ void VaultSDLNode::InitStateDataRecord (const wchar_t sdlRecName[], unsigned wri
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultImageNode::VaultImageNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, title(node->string64_1)
|
||||
, imgType(node->int32_1)
|
||||
, imgData(node->blob_1)
|
||||
, imgDataLen(node->blob_1Length)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultImageNode::SetImageTitle (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kImageTitle, base, &title, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultImageNode::SetImageType (int v) {
|
||||
IVaultNodeSetValue(kImageType, base, &imgType, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultImageNode::SetImageData (const uint8_t buffer[], unsigned bytes) {
|
||||
IVaultNodeSetBlob(kImageData, base, &imgData, &imgDataLen, buffer, bytes);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
#ifdef CLIENT
|
||||
void VaultImageNode::StuffImage (plMipmap * src, int dstType) {
|
||||
@ -647,14 +372,14 @@ void VaultImageNode::StuffImage (plMipmap * src, int dstType) {
|
||||
}
|
||||
|
||||
if (compressSuccess) {
|
||||
unsigned bytes = ramStream.GetEOF();
|
||||
unsigned bytes = ramStream.GetEOF();
|
||||
uint8_t * buffer = (uint8_t *)malloc(bytes);
|
||||
ramStream.CopyToMem(buffer);
|
||||
IVaultNodeSetBlob(kImageData, base, &imgData, &imgDataLen, buffer, bytes);
|
||||
SetImageData(buffer, bytes);
|
||||
SetImageType(dstType);
|
||||
free(buffer);
|
||||
} else {
|
||||
IVaultNodeSetBlob(kImageData, base, &imgData, &imgDataLen, nil, 0);
|
||||
SetImageData(nil, 0);
|
||||
SetImageType(kNone);
|
||||
}
|
||||
}
|
||||
@ -664,10 +389,10 @@ void VaultImageNode::StuffImage (plMipmap * src, int dstType) {
|
||||
#ifdef CLIENT
|
||||
bool VaultImageNode::ExtractImage (plMipmap ** dst) {
|
||||
hsRAMStream ramStream;
|
||||
ramStream.Write(imgDataLen, imgData);
|
||||
ramStream.Write(GetImageDataLength(), GetImageData());
|
||||
ramStream.Rewind();
|
||||
|
||||
switch (imgType) {
|
||||
switch (GetImageType()) {
|
||||
case kJPEG:
|
||||
(*dst) = plJPEG::Instance().ReadFromStream(&ramStream);
|
||||
break;
|
||||
@ -707,30 +432,10 @@ struct MatchesSpawnPointName
|
||||
};
|
||||
#endif
|
||||
|
||||
//============================================================================
|
||||
VaultAgeLinkNode::VaultAgeLinkNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, unlocked(node->int32_1)
|
||||
, volat(node->int32_2)
|
||||
, spawnPoints(node->blob_1)
|
||||
, spawnPointsLen(node->blob_1Length)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeLinkNode::SetUnlocked (int v) {
|
||||
IVaultNodeSetValue(kUnlocked, base, &unlocked, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeLinkNode::SetVolatile (int v) {
|
||||
IVaultNodeSetValue(kVolatile, base, &volat, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
#ifdef CLIENT
|
||||
bool VaultAgeLinkNode::CopyTo (plAgeLinkStruct * link) {
|
||||
if (RelVaultNode * me = VaultGetNodeIncRef(base->nodeId)) {
|
||||
if (RelVaultNode * me = VaultGetNodeIncRef(base->GetNodeId())) {
|
||||
if (RelVaultNode * info = me->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1)) {
|
||||
VaultAgeInfoNode access(info);
|
||||
access.CopyTo(link->GetAgeInfo());
|
||||
@ -801,7 +506,7 @@ bool VaultAgeLinkNode::HasSpawnPoint (const plSpawnPointInfo & point) const {
|
||||
#ifdef CLIENT
|
||||
void VaultAgeLinkNode::GetSpawnPoints (plSpawnPointVec * out) const {
|
||||
|
||||
plString str = plString::FromUtf8(reinterpret_cast<const char*>(spawnPoints), spawnPointsLen);
|
||||
plString str = plString::FromUtf8(reinterpret_cast<const char*>(GetSpawnPoints()), GetSpawnPointsLength());
|
||||
std::vector<plString> izer = str.Tokenize(";");
|
||||
for (auto token1 = izer.begin(); token1 != izer.end(); ++token1)
|
||||
{
|
||||
@ -830,132 +535,17 @@ void VaultAgeLinkNode::SetSpawnPoints (const plSpawnPointVec & in) {
|
||||
<< in[i].fSpawnPt << ":"
|
||||
<< in[i].fCameraStack << ";";
|
||||
}
|
||||
IVaultNodeSetBlob(
|
||||
kSpawnPoints,
|
||||
base,
|
||||
&spawnPoints,
|
||||
&spawnPointsLen,
|
||||
(const uint8_t *)ss.GetString().c_str(),
|
||||
ss.GetLength()
|
||||
);
|
||||
plString blob = ss.GetString();
|
||||
SetSpawnPoints(reinterpret_cast<const uint8_t *>(blob.c_str()), blob.GetSize());
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultAgeNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultAgeNode::VaultAgeNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, ageInstUuid(node->uuid_1)
|
||||
, parentAgeInstUuid(node->uuid_2)
|
||||
, ageName(node->string64_1)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeNode::SetAgeInstGuid (const plUUID& v) {
|
||||
IVaultNodeSetValue(kAgeInstanceGuid, base, &ageInstUuid, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeNode::SetParentAgeInstGuid (const plUUID& v) {
|
||||
IVaultNodeSetValue(kParentAgeInstanceGuid, base, &parentAgeInstUuid, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeNode::SetAgeName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kAgeName, base, &ageName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultAgeInfoNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultAgeInfoNode::VaultAgeInfoNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, ageFilename(node->string64_2)
|
||||
, ageInstName(node->string64_3)
|
||||
, ageUserDefinedName(node->string64_4)
|
||||
, ageInstUuid(node->uuid_1)
|
||||
, parentAgeInstUuid(node->uuid_2)
|
||||
, ageSequenceNumber(node->int32_1)
|
||||
, ageIsPublic(node->int32_2)
|
||||
, ageLanguage(node->int32_3)
|
||||
, ageId(node->uint32_1)
|
||||
, ageCzarId(node->uint32_2)
|
||||
, ageInfoFlags(node->uint32_3)
|
||||
, ageDescription(node->text_1)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeFilename (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kAgeFilename, base, &ageFilename, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeInstName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kAgeInstanceName, base, &ageInstName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeUserDefinedName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kAgeUserDefinedName, base, &ageUserDefinedName, v, kMaxVaultNodeStringLength);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeInstGuid (const plUUID& v) {
|
||||
IVaultNodeSetValue(kAgeInstanceGuid, base, &ageInstUuid, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetParentAgeInstGuid (const plUUID& v) {
|
||||
IVaultNodeSetValue(kParentAgeInstanceGuid, base, &parentAgeInstUuid, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeSequenceNumber (int v) {
|
||||
IVaultNodeSetValue(kAgeSequenceNumber, base, &ageSequenceNumber, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::_SetAgeIsPublic (int v) {
|
||||
IVaultNodeSetValue(kIsPublic, base, &ageIsPublic, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeLanguage (int v) {
|
||||
IVaultNodeSetValue(kAgeLanguage, base, &ageLanguage, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeId (unsigned v) {
|
||||
IVaultNodeSetValue(kAgeId, base, &ageId, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeCzarId (unsigned v) {
|
||||
IVaultNodeSetValue(kAgeCzarId, base, &ageCzarId, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeInfoFlags (unsigned v) {
|
||||
IVaultNodeSetValue(kAgeInfoFlags, base, &ageInfoFlags, v);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultAgeInfoNode::SetAgeDescription (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kAgeDescription, base, &ageDescription, v, (unsigned)-1);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
#ifdef CLIENT
|
||||
const class plUnifiedTime * VaultAgeInfoNode::GetAgeTime () const {
|
||||
@ -978,13 +568,13 @@ void VaultAgeInfoNode::CopyFrom (const plAgeInfoStruct * info) {
|
||||
SetAgeFilename(nil);
|
||||
}
|
||||
|
||||
// age instance name
|
||||
// age instance name
|
||||
if (info->HasAgeInstanceName()) {
|
||||
StrToUnicode(str, info->GetAgeInstanceName(), arrsize(str));
|
||||
SetAgeInstName(str);
|
||||
SetAgeInstanceName(str);
|
||||
}
|
||||
else {
|
||||
SetAgeInstName(nil);
|
||||
SetAgeInstanceName(nil);
|
||||
}
|
||||
|
||||
// age user-defined name
|
||||
@ -1010,9 +600,9 @@ void VaultAgeInfoNode::CopyFrom (const plAgeInfoStruct * info) {
|
||||
SetAgeSequenceNumber(info->GetAgeSequenceNumber());
|
||||
|
||||
// age instance guid
|
||||
SetAgeInstGuid(*info->GetAgeInstanceGuid());
|
||||
SetAgeInstanceGuid(*info->GetAgeInstanceGuid());
|
||||
|
||||
// age language
|
||||
// age language
|
||||
SetAgeLanguage(info->GetAgeLanguage());
|
||||
}
|
||||
#endif // def CLIENT
|
||||
@ -1022,73 +612,29 @@ void VaultAgeInfoNode::CopyFrom (const plAgeInfoStruct * info) {
|
||||
void VaultAgeInfoNode::CopyTo (plAgeInfoStruct * info) const {
|
||||
char str[MAX_PATH];
|
||||
|
||||
// age filename
|
||||
StrToAnsi(str, ageFilename, arrsize(str));
|
||||
// age filename
|
||||
StrToAnsi(str, GetAgeFilename(), arrsize(str));
|
||||
info->SetAgeFilename(str);
|
||||
|
||||
|
||||
// age instance name
|
||||
StrToAnsi(str, ageInstName, arrsize(str));
|
||||
StrToAnsi(str, GetAgeInstanceName(), arrsize(str));
|
||||
info->SetAgeInstanceName(str);
|
||||
|
||||
|
||||
// age user-defined name
|
||||
StrToAnsi(str, ageUserDefinedName, arrsize(str));
|
||||
StrToAnsi(str, GetAgeUserDefinedName(), arrsize(str));
|
||||
info->SetAgeUserDefinedName(str);
|
||||
|
||||
// age description
|
||||
// TODO
|
||||
|
||||
|
||||
// age sequence number
|
||||
info->SetAgeSequenceNumber(ageSequenceNumber);
|
||||
|
||||
info->SetAgeSequenceNumber(GetAgeSequenceNumber());
|
||||
|
||||
// age instance guid
|
||||
plUUID uuid(ageInstUuid);
|
||||
plUUID uuid(GetAgeInstanceGuid());
|
||||
info->SetAgeInstanceGuid(&uuid);
|
||||
|
||||
|
||||
// age language
|
||||
info->SetAgeLanguage(ageLanguage);
|
||||
info->SetAgeLanguage(GetAgeLanguage());
|
||||
}
|
||||
#endif // def CLIENT
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultSystemNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultSystemNode::VaultSystemNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, ccrStatus(node->int32_1)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultSystemNode::SetCCRStatus (int v) {
|
||||
IVaultNodeSetValue(kCCRStatus, base, &ccrStatus, v);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* VaultMarkerGameNode
|
||||
*
|
||||
***/
|
||||
|
||||
//============================================================================
|
||||
VaultMarkerGameNode::VaultMarkerGameNode (NetVaultNode * node)
|
||||
: NetVaultNodeAccess(node)
|
||||
, gameName(node->text_1)
|
||||
, gameGuid(node->uuid_1)
|
||||
{
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultMarkerGameNode::SetGameName (const wchar_t v[]) {
|
||||
IVaultNodeSetString(kGameName, base, &gameName, v, (unsigned)-1);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void VaultMarkerGameNode::SetGameGuid (const plUUID& v) {
|
||||
IVaultNodeSetValue(kGameGuid, base, &gameGuid, v);
|
||||
}
|
||||
|
@ -74,49 +74,38 @@ uint64_t GetNodeVolatileFields(NetVaultNode* node);
|
||||
//============================================================================
|
||||
struct NetVaultNodeAccess {
|
||||
NetVaultNode * base;
|
||||
uint64_t & fieldFlags;
|
||||
uint64_t & dirtyFlags;
|
||||
|
||||
NetVaultNodeAccess (NetVaultNode * node);
|
||||
NetVaultNodeAccess (const NetVaultNodeAccess &); // not implemented
|
||||
const NetVaultNodeAccess & operator= (const NetVaultNodeAccess &); // not implemented
|
||||
NetVaultNodeAccess (NetVaultNode * node) : base(node) { }
|
||||
|
||||
private:
|
||||
NetVaultNodeAccess (const NetVaultNodeAccess &) { }
|
||||
const NetVaultNodeAccess & operator= (const NetVaultNodeAccess &) { }
|
||||
};
|
||||
|
||||
#define VNODE_ACCESSOR(type, name, basename) \
|
||||
static const uint64_t k##name = NetVaultNode::k##basename; \
|
||||
type Get##name () const { return base->Get##basename(); } \
|
||||
void Set##name (type v) { base->Set##basename(v); }
|
||||
|
||||
#define VNODE_BLOB(name, basename) \
|
||||
static const uint64_t k##name = NetVaultNode::k##basename; \
|
||||
const uint8_t * Get##name () const { return base->Get##basename(); } \
|
||||
size_t Get##name##Length () const { return base->Get##basename##Length(); } \
|
||||
void Set##name (const uint8_t data[], size_t length) { base->Set##basename(data, length); }
|
||||
|
||||
//============================================================================
|
||||
// VaultPlayerNode
|
||||
//============================================================================
|
||||
struct VaultPlayerNode : NetVaultNodeAccess {
|
||||
static const uint64_t kPlayerName = NetVaultNode::kIString64_1;
|
||||
static const uint64_t kAvatarShapeName = NetVaultNode::kString64_1;
|
||||
static const uint64_t kDisabled = NetVaultNode::kInt32_1;
|
||||
static const uint64_t kExplorer = NetVaultNode::kInt32_2; // explorer = 1, visitor = 0
|
||||
static const uint64_t kOnlineTime = NetVaultNode::kUInt32_1;
|
||||
static const uint64_t kAccountUuid = NetVaultNode::kUuid_1;
|
||||
static const uint64_t kInviteUuid = NetVaultNode::kUuid_2;
|
||||
VNODE_ACCESSOR(const wchar_t *, PlayerName, IString64_1);
|
||||
VNODE_ACCESSOR(const wchar_t *, AvatarShapeName, String64_1);
|
||||
VNODE_ACCESSOR(int32_t, Disabled, Int32_1);
|
||||
VNODE_ACCESSOR(int32_t, Explorer, Int32_2); // explorer = 1, visitor = 0
|
||||
VNODE_ACCESSOR(uint32_t, OnlineTime, UInt32_1);
|
||||
VNODE_ACCESSOR(plUUID, AccountUuid, Uuid_1);
|
||||
VNODE_ACCESSOR(plUUID, InviteUuid, Uuid_2);
|
||||
|
||||
// Treat these as read-only or node flag fields will become invalid
|
||||
// Threaded apps: Must be accessed with node->critsect locked
|
||||
wchar_t *& playerName;
|
||||
wchar_t *& avatarShapeName;
|
||||
int & disabled;
|
||||
unsigned & onlineTime;
|
||||
plUUID& accountUuid;
|
||||
plUUID& inviteUuid;
|
||||
int & explorer;
|
||||
|
||||
VaultPlayerNode (NetVaultNode * node);
|
||||
VaultPlayerNode (const VaultPlayerNode &); // not implemented
|
||||
const VaultPlayerNode & operator= (const VaultPlayerNode &); // not implemented
|
||||
|
||||
// Threaded apps: Must be called with node->critsect locked
|
||||
void SetPlayerName (const wchar_t v[]);
|
||||
void SetAvatarShapeName (const wchar_t v[]);
|
||||
void SetDisabled (int v);
|
||||
void SetOnlineTime (unsigned v);
|
||||
void SetAccountUuid (const plUUID& v);
|
||||
void SetInviteUuid (const plUUID& v);
|
||||
void SetExplorer (int v);
|
||||
VaultPlayerNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
};
|
||||
|
||||
|
||||
@ -124,33 +113,14 @@ struct VaultPlayerNode : NetVaultNodeAccess {
|
||||
// VaultPlayerInfoNode
|
||||
//============================================================================
|
||||
struct VaultPlayerInfoNode : NetVaultNodeAccess {
|
||||
static const uint64_t kPlayerId = NetVaultNode::kUInt32_1;
|
||||
static const uint64_t kPlayerName = NetVaultNode::kIString64_1;
|
||||
static const uint64_t kAgeInstName = NetVaultNode::kString64_1; // name of age player is currently in
|
||||
static const uint64_t kAgeInstUuid = NetVaultNode::kUuid_1; // guid of age player is currently in
|
||||
static const uint64_t kOnline = NetVaultNode::kInt32_1; // whether or not player is online
|
||||
static const uint64_t kCCRLevel = NetVaultNode::kInt32_2;
|
||||
|
||||
// Treat these as read-only or node flag fields will become invalid
|
||||
// Threaded apps: Must be accessed with node->critsect locked
|
||||
unsigned & playerId;
|
||||
wchar_t *& playerName;
|
||||
wchar_t *& ageInstName;
|
||||
plUUID& ageInstUuid;
|
||||
int & online;
|
||||
int & ccrLevel;
|
||||
VNODE_ACCESSOR(uint32_t, PlayerId, UInt32_1);
|
||||
VNODE_ACCESSOR(const wchar_t *, PlayerName, IString64_1);
|
||||
VNODE_ACCESSOR(const wchar_t *, AgeInstName, String64_1); // name of age player is currently in
|
||||
VNODE_ACCESSOR(plUUID, AgeInstUuid, Uuid_1); // guid of age player is currently in
|
||||
VNODE_ACCESSOR(int32_t, Online, Int32_1); // whether or not player is online
|
||||
VNODE_ACCESSOR(int32_t, CCRLevel, Int32_2);
|
||||
|
||||
VaultPlayerInfoNode (NetVaultNode * node);
|
||||
VaultPlayerInfoNode (const VaultPlayerInfoNode &); // not implemented
|
||||
const VaultPlayerInfoNode & operator= (const VaultPlayerInfoNode &); // not implemented
|
||||
|
||||
// Threaded apps: Must be called with node->critsect locked
|
||||
void SetPlayerId (unsigned v);
|
||||
void SetPlayerName (const wchar_t v[]);
|
||||
void SetAgeInstName (const wchar_t v[]);
|
||||
void SetAgeInstUuid (const plUUID& v);
|
||||
void SetOnline (int v);
|
||||
void SetCCRLevel (int v);
|
||||
VaultPlayerInfoNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
};
|
||||
|
||||
|
||||
@ -158,21 +128,10 @@ struct VaultPlayerInfoNode : NetVaultNodeAccess {
|
||||
// VaultFolderNode
|
||||
//============================================================================
|
||||
struct VaultFolderNode : NetVaultNodeAccess {
|
||||
static const uint64_t kFolderType = NetVaultNode::kInt32_1;
|
||||
static const uint64_t kFolderName = NetVaultNode::kString64_1;
|
||||
|
||||
// Treat these as read-only or node flag fields will become invalid
|
||||
// Threaded apps: Must be accessed with node->critsect locked
|
||||
int & folderType;
|
||||
wchar_t *& folderName;
|
||||
|
||||
VaultFolderNode (NetVaultNode * node);
|
||||
VaultFolderNode (const VaultFolderNode &); // not implemented
|
||||
const VaultFolderNode & operator= (const VaultFolderNode &); // not implemented
|
||||
VNODE_ACCESSOR(int32_t, FolderType, Int32_1);
|
||||
VNODE_ACCESSOR(const wchar_t *, FolderName, String64_1);
|
||||
|
||||
// Threaded apps: Must be called with node->critsect locked
|
||||
void SetFolderName (const wchar_t v[]);
|
||||
void SetFolderType (int v);
|
||||
VaultFolderNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
};
|
||||
|
||||
|
||||
@ -180,44 +139,25 @@ struct VaultFolderNode : NetVaultNodeAccess {
|
||||
// VaultPlayerInfoListNode
|
||||
//============================================================================
|
||||
struct VaultPlayerInfoListNode : VaultFolderNode {
|
||||
|
||||
VaultPlayerInfoListNode (NetVaultNode * node);
|
||||
VaultPlayerInfoListNode (const VaultPlayerInfoListNode &); // not implemented
|
||||
const VaultPlayerInfoListNode & operator= (const VaultPlayerInfoListNode &); // not implemented
|
||||
VaultPlayerInfoListNode (NetVaultNode * node) : VaultFolderNode(node) { }
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// VaultAgeInfoListNode
|
||||
//============================================================================
|
||||
struct VaultAgeInfoListNode : VaultFolderNode {
|
||||
|
||||
VaultAgeInfoListNode (NetVaultNode * node);
|
||||
VaultAgeInfoListNode (const VaultAgeInfoListNode &); // not implemented
|
||||
const VaultAgeInfoListNode & operator= (const VaultAgeInfoListNode &); // not implemented
|
||||
VaultAgeInfoListNode (NetVaultNode * node) : VaultFolderNode(node) { }
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// VaultChronicleNode
|
||||
//============================================================================
|
||||
struct VaultChronicleNode : NetVaultNodeAccess {
|
||||
static const uint64_t kEntryType = NetVaultNode::kInt32_1;
|
||||
static const uint64_t kEntryName = NetVaultNode::kString64_1;
|
||||
static const uint64_t kEntryValue = NetVaultNode::kText_1;
|
||||
|
||||
// Treat these as read-only or node flag fields will become invalid
|
||||
// Threaded apps: Must be accessed with node->critsect locked
|
||||
int & entryType;
|
||||
wchar_t *& entryName;
|
||||
wchar_t *& entryValue;
|
||||
VNODE_ACCESSOR(int32_t, EntryType, Int32_1);
|
||||
VNODE_ACCESSOR(const wchar_t *, EntryName, String64_1);
|
||||
VNODE_ACCESSOR(const wchar_t *, EntryValue, Text_1);
|
||||
|
||||
VaultChronicleNode (NetVaultNode * node);
|
||||
VaultChronicleNode (const VaultChronicleNode &); // not implemented
|
||||
const VaultChronicleNode & operator= (const VaultChronicleNode &); // not implemented
|
||||
|
||||
// Threaded apps: Must be called with node->critsect locked
|
||||
void SetEntryType (int v);
|
||||
void SetEntryName (const wchar_t v[]);
|
||||
void SetEntryValue (const wchar_t v[]);
|
||||
VaultChronicleNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
};
|
||||
|
||||
|
||||
@ -225,21 +165,11 @@ struct VaultChronicleNode : NetVaultNodeAccess {
|
||||
// VaultSDLNode
|
||||
//============================================================================
|
||||
struct VaultSDLNode : NetVaultNodeAccess {
|
||||
static const uint64_t kSDLName = NetVaultNode::kString64_1;
|
||||
static const uint64_t kSDLIdent = NetVaultNode::kInt32_1;
|
||||
static const uint64_t kSDLData = NetVaultNode::kBlob_1;
|
||||
|
||||
int & sdlIdent;
|
||||
wchar_t *& sdlName;
|
||||
uint8_t *& sdlData;
|
||||
unsigned & sdlDataLen;
|
||||
|
||||
VaultSDLNode (NetVaultNode * node);
|
||||
VaultSDLNode (const VaultSDLNode &); // not implemented
|
||||
const VaultSDLNode & operator= (const VaultSDLNode &); // not implemented
|
||||
|
||||
void SetSdlIdent (int v);
|
||||
void SetSdlName (const wchar_t v[]);
|
||||
VNODE_ACCESSOR(const wchar_t *, SDLName, String64_1);
|
||||
VNODE_ACCESSOR(int32_t, SDLIdent, Int32_1);
|
||||
VNODE_BLOB ( SDLData, Blob_1);
|
||||
|
||||
VaultSDLNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
|
||||
#ifdef CLIENT
|
||||
bool GetStateDataRecord (class plStateDataRecord * out, unsigned readOptions = 0);
|
||||
@ -252,21 +182,11 @@ struct VaultSDLNode : NetVaultNodeAccess {
|
||||
// VaultAgeLinkNode
|
||||
//============================================================================
|
||||
struct VaultAgeLinkNode : NetVaultNodeAccess {
|
||||
static const uint64_t kUnlocked = NetVaultNode::kInt32_1;
|
||||
static const uint64_t kVolatile = NetVaultNode::kInt32_2;
|
||||
static const uint64_t kSpawnPoints = NetVaultNode::kBlob_1;
|
||||
VNODE_ACCESSOR(int32_t, Unlocked, Int32_1);
|
||||
VNODE_ACCESSOR(int32_t, Volatile, Int32_2);
|
||||
VNODE_BLOB ( SpawnPoints, Blob_1);
|
||||
|
||||
int & unlocked;
|
||||
int & volat;
|
||||
uint8_t *& spawnPoints;
|
||||
unsigned & spawnPointsLen;
|
||||
|
||||
VaultAgeLinkNode (NetVaultNode * node);
|
||||
VaultAgeLinkNode (const VaultAgeLinkNode &); // not implemented
|
||||
const VaultAgeLinkNode & operator= (const VaultAgeLinkNode &); // not implemented
|
||||
|
||||
void SetUnlocked (int v);
|
||||
void SetVolatile (int v);
|
||||
VaultAgeLinkNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
|
||||
#ifdef CLIENT
|
||||
bool CopyTo (plAgeLinkStruct * link);
|
||||
@ -283,26 +203,14 @@ struct VaultAgeLinkNode : NetVaultNodeAccess {
|
||||
// VaultImageNode
|
||||
//============================================================================
|
||||
struct VaultImageNode : NetVaultNodeAccess {
|
||||
|
||||
enum ImageTypes { kNone=0, kJPEG=1, kPNG=2 };
|
||||
|
||||
static const uint64_t kImageType = NetVaultNode::kInt32_1;
|
||||
static const uint64_t kImageTitle = NetVaultNode::kString64_1;
|
||||
static const uint64_t kImageData = NetVaultNode::kBlob_1;
|
||||
VNODE_ACCESSOR(int32_t, ImageType, Int32_1);
|
||||
VNODE_ACCESSOR(const wchar_t *, ImageTitle, String64_1);
|
||||
VNODE_BLOB ( ImageData, Blob_1);
|
||||
|
||||
wchar_t *& title;
|
||||
int & imgType;
|
||||
uint8_t *& imgData;
|
||||
unsigned & imgDataLen;
|
||||
VaultImageNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
|
||||
VaultImageNode (NetVaultNode * node);
|
||||
VaultImageNode (const VaultImageNode &); // not implemented
|
||||
const VaultImageNode & operator= (const VaultImageNode &); // not implemented
|
||||
|
||||
void SetImageTitle (const wchar_t v[]);
|
||||
void SetImageType (int v);
|
||||
void SetImageData (const uint8_t buffer[], unsigned bytes);
|
||||
|
||||
#ifdef CLIENT
|
||||
void StuffImage (class plMipmap * src, int dstType=kJPEG);
|
||||
bool ExtractImage (class plMipmap ** dst);
|
||||
@ -316,9 +224,7 @@ struct VaultImageNode : NetVaultNodeAccess {
|
||||
struct VaultCliImageNode : VaultImageNode {
|
||||
class plMipmap * fMipmap;
|
||||
|
||||
VaultCliImageNode (NetVaultNode * node);
|
||||
VaultCliImageNode (const VaultCliImageNode &); // not implemented
|
||||
const VaultCliImageNode & operator= (const VaultCliImageNode &); // not implemented
|
||||
VaultCliImageNode (NetVaultNode * node) : VaultImageNode(node) { }
|
||||
};
|
||||
#endif // def CLIENT
|
||||
|
||||
@ -326,27 +232,14 @@ struct VaultCliImageNode : VaultImageNode {
|
||||
// VaultTextNoteNode
|
||||
//============================================================================
|
||||
struct VaultTextNoteNode : NetVaultNodeAccess {
|
||||
VNODE_ACCESSOR(int32_t, NoteType, Int32_1);
|
||||
VNODE_ACCESSOR(int32_t, NoteSubType, Int32_2);
|
||||
VNODE_ACCESSOR(const wchar_t *, NoteTitle, String64_1);
|
||||
VNODE_ACCESSOR(const wchar_t *, NoteText, Text_1);
|
||||
|
||||
static const uint64_t kNoteType = NetVaultNode::kInt32_1;
|
||||
static const uint64_t kNoteSubType = NetVaultNode::kInt32_2;
|
||||
static const uint64_t kNoteTitle = NetVaultNode::kString64_1;
|
||||
static const uint64_t kNoteText = NetVaultNode::kText_1;
|
||||
|
||||
int & noteType;
|
||||
int & noteSubType;
|
||||
wchar_t *& noteTitle;
|
||||
wchar_t *& noteText;
|
||||
VaultTextNoteNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
|
||||
VaultTextNoteNode (NetVaultNode * node);
|
||||
VaultTextNoteNode (const VaultTextNoteNode &); // not implemented
|
||||
const VaultTextNoteNode & operator= (const VaultTextNoteNode &); // not implemented
|
||||
|
||||
void SetNoteType (int v);
|
||||
void SetNoteSubType (int v);
|
||||
void SetNoteTitle (const wchar_t v[]);
|
||||
void SetNoteText (const wchar_t v[]);
|
||||
|
||||
#ifdef CLIENT
|
||||
#ifdef CLIENT
|
||||
// for kNoteType_Visit/UnVisit
|
||||
void SetVisitInfo (const plAgeInfoStruct & info);
|
||||
bool GetVisitInfo (plAgeInfoStruct * info);
|
||||
@ -357,72 +250,34 @@ struct VaultTextNoteNode : NetVaultNodeAccess {
|
||||
// VaultAgeNode
|
||||
//============================================================================
|
||||
struct VaultAgeNode : NetVaultNodeAccess {
|
||||
VNODE_ACCESSOR(plUUID, AgeInstanceGuid, Uuid_1);
|
||||
VNODE_ACCESSOR(plUUID, ParentAgeInstanceGuid, Uuid_2);
|
||||
VNODE_ACCESSOR(const wchar_t *, AgeName, String64_1);
|
||||
|
||||
static const uint64_t kAgeInstanceGuid = NetVaultNode::kUuid_1;
|
||||
static const uint64_t kParentAgeInstanceGuid = NetVaultNode::kUuid_2;
|
||||
static const uint64_t kAgeName = NetVaultNode::kString64_1;
|
||||
|
||||
plUUID& ageInstUuid;
|
||||
plUUID& parentAgeInstUuid;
|
||||
wchar_t *& ageName;
|
||||
|
||||
VaultAgeNode (NetVaultNode * node);
|
||||
VaultAgeNode (const VaultAgeNode &); // not implemented
|
||||
const VaultAgeNode & operator= (const VaultAgeNode &); // not implemented
|
||||
|
||||
void SetAgeInstGuid (const plUUID& v);
|
||||
void SetParentAgeInstGuid (const plUUID& v);
|
||||
void SetAgeName (const wchar_t v[]);
|
||||
VaultAgeNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
};
|
||||
|
||||
//============================================================================
|
||||
// VaultAgeInfoNode
|
||||
//============================================================================
|
||||
struct VaultAgeInfoNode : NetVaultNodeAccess {
|
||||
VNODE_ACCESSOR(const wchar_t *, AgeFilename, String64_2); // "Garden"
|
||||
VNODE_ACCESSOR(const wchar_t *, AgeInstanceName, String64_3); // "Eder Kemo"
|
||||
VNODE_ACCESSOR(const wchar_t *, AgeUserDefinedName, String64_4); // "Joe's"
|
||||
VNODE_ACCESSOR(plUUID, AgeInstanceGuid, Uuid_1); // 6278b081-342a-4229-ac1b-a0b8a2658390
|
||||
VNODE_ACCESSOR(plUUID, ParentAgeInstanceGuid, Uuid_2); // 9192be7f-89ef-41bc-83db-79afe451e399
|
||||
VNODE_ACCESSOR(const wchar_t *, AgeDescription, Text_1); // "Stay out!"
|
||||
VNODE_ACCESSOR(int32_t, AgeSequenceNumber, Int32_1);
|
||||
VNODE_ACCESSOR(int32_t, AgeLanguage, Int32_3); // The language of the client that made this age
|
||||
VNODE_ACCESSOR(uint32_t, AgeId, UInt32_1);
|
||||
VNODE_ACCESSOR(uint32_t, AgeCzarId, UInt32_2);
|
||||
VNODE_ACCESSOR(uint32_t, AgeInfoFlags, UInt32_3);
|
||||
|
||||
static const uint64_t kAgeFilename = NetVaultNode::kString64_2; // "Garden"
|
||||
static const uint64_t kAgeInstanceName = NetVaultNode::kString64_3; // "Eder Kemo"
|
||||
static const uint64_t kAgeUserDefinedName = NetVaultNode::kString64_4; // "Joe's"
|
||||
static const uint64_t kAgeInstanceGuid = NetVaultNode::kUuid_1; // 6278b081-342a-4229-ac1b-a0b8a2658390
|
||||
static const uint64_t kParentAgeInstanceGuid = NetVaultNode::kUuid_2; // 9192be7f-89ef-41bc-83db-79afe451e399
|
||||
static const uint64_t kAgeDescription = NetVaultNode::kText_1; // "Stay out!"
|
||||
static const uint64_t kAgeSequenceNumber = NetVaultNode::kInt32_1;
|
||||
static const uint64_t kIsPublic = NetVaultNode::kInt32_2;
|
||||
static const uint64_t kAgeLanguage = NetVaultNode::kInt32_3; // The language of the client that made this age
|
||||
static const uint64_t kAgeId = NetVaultNode::kUInt32_1;
|
||||
static const uint64_t kAgeCzarId = NetVaultNode::kUInt32_2;
|
||||
static const uint64_t kAgeInfoFlags = NetVaultNode::kUInt32_3;
|
||||
|
||||
wchar_t *& ageFilename;
|
||||
wchar_t *& ageInstName;
|
||||
wchar_t *& ageUserDefinedName;
|
||||
plUUID& ageInstUuid;
|
||||
plUUID& parentAgeInstUuid;
|
||||
int & ageSequenceNumber;
|
||||
int & ageIsPublic;
|
||||
int & ageLanguage;
|
||||
unsigned & ageId;
|
||||
unsigned & ageCzarId;
|
||||
unsigned & ageInfoFlags;
|
||||
wchar_t *& ageDescription;
|
||||
// WARNING: Do not set this. The age will not be set public this way. Use NetCliAuthSetAgePublic instead (changes this field's value in the process).
|
||||
VNODE_ACCESSOR(int32_t, IsPublic, Int32_2);
|
||||
|
||||
VaultAgeInfoNode (NetVaultNode * node);
|
||||
VaultAgeInfoNode (const VaultAgeInfoNode &); // not implemented
|
||||
const VaultAgeInfoNode & operator= (const VaultAgeInfoNode &); // not implemented
|
||||
VaultAgeInfoNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
|
||||
void SetAgeFilename (const wchar_t v[]);
|
||||
void SetAgeInstName (const wchar_t v[]);
|
||||
void SetAgeUserDefinedName (const wchar_t v[]);
|
||||
void SetAgeInstGuid (const plUUID& v);
|
||||
void SetParentAgeInstGuid (const plUUID& v);
|
||||
void SetAgeSequenceNumber (int v);
|
||||
void _SetAgeIsPublic (int v); // WARNING: Do not call this. The age will not be set public this way. Use NetCliAuthSetAgePublic instead (changes this field's value in the process).
|
||||
void SetAgeLanguage (int v);
|
||||
void SetAgeId (unsigned v);
|
||||
void SetAgeCzarId (unsigned v);
|
||||
void SetAgeInfoFlags (unsigned v);
|
||||
void SetAgeDescription (const wchar_t v[]);
|
||||
|
||||
#ifdef CLIENT
|
||||
const class plUnifiedTime * GetAgeTime () const;
|
||||
void CopyFrom (const plAgeInfoStruct * info);
|
||||
@ -434,16 +289,9 @@ struct VaultAgeInfoNode : NetVaultNodeAccess {
|
||||
// VaultSystemNode
|
||||
//============================================================================
|
||||
struct VaultSystemNode : NetVaultNodeAccess {
|
||||
VNODE_ACCESSOR(int32_t, CCRStatus, Int32_1);
|
||||
|
||||
static const uint64_t kCCRStatus = NetVaultNode::kInt32_1;
|
||||
|
||||
int & ccrStatus;
|
||||
|
||||
VaultSystemNode (NetVaultNode * node);
|
||||
VaultSystemNode (const VaultTextNoteNode &); // not implemented
|
||||
const VaultSystemNode & operator= (const VaultSystemNode &); // not implemented
|
||||
|
||||
void SetCCRStatus (int v);
|
||||
VaultSystemNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
};
|
||||
|
||||
|
||||
@ -451,17 +299,8 @@ struct VaultSystemNode : NetVaultNodeAccess {
|
||||
// VaultMarkerGameNode
|
||||
//============================================================================
|
||||
struct VaultMarkerGameNode : NetVaultNodeAccess {
|
||||
VNODE_ACCESSOR(const wchar_t *, GameName, Text_1);
|
||||
VNODE_ACCESSOR(plUUID, GameGuid, Uuid_1);
|
||||
|
||||
static const uint64_t kGameName = NetVaultNode::kText_1;
|
||||
static const uint64_t kGameGuid = NetVaultNode::kUuid_1;
|
||||
|
||||
wchar_t *& gameName;
|
||||
plUUID& gameGuid;
|
||||
|
||||
VaultMarkerGameNode (NetVaultNode * node);
|
||||
VaultMarkerGameNode (const VaultMarkerGameNode &); // not implemented
|
||||
const VaultMarkerGameNode & operator= (const VaultMarkerGameNode &); // not implemented
|
||||
|
||||
void SetGameName (const wchar_t v[]);
|
||||
void SetGameGuid (const plUUID& v);
|
||||
VaultMarkerGameNode (NetVaultNode * node) : NetVaultNodeAccess(node) { }
|
||||
};
|
||||
|
Reference in New Issue
Block a user