1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Initial Commit of CyanWorlds.com Engine Open Source Client/Plugin

This commit is contained in:
jwplatt
2011-03-12 12:34:52 -05:00
commit b970ae4bad
3976 changed files with 1301355 additions and 0 deletions

View File

@ -0,0 +1,35 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/PubUtilLib/plVault/Intern.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_INTERN_H
#error "Header $/Plasma20/Sources/Plasma/PubUtilLib/plVault/Intern.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_INTERN_H

View File

@ -0,0 +1,76 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/PubUtilLib/plVault/Pch.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PCH_H
#error "Header $/Plasma20/Sources/Plasma/PubUtilLib/plVault/Pch.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PCH_H
// 'Old' system is full of compiler warnings at /W4, so just hide them
#pragma warning(push, 0)
#include "plVault.h"
#pragma warning(pop)
#ifdef CLIENT
// 'Old' system is full of compiler warnings at /W4, so just hide them
#pragma warning(push, 0)
#include <algorithm>
#include <sstream>
#include "hsStlUtils.h"
#include "hsStringTokenizer.h"
#include "hsGeometry3.h"
#include "../plSDL/plSDL.h"
#include "../plUnifiedTime/plUnifiedTime.h"
#include "../plNetCommon/plNetCommon.h"
#include "../plNetCommon/plNetServerSessionInfo.h"
#include "../plNetCommon/plSpawnPointInfo.h"
#include "../pnDispatch/plDispatch.h"
#include "plDniCoordinateInfo.h"
#include "../plGImage/plMipmap.h"
#include "../plJPEG/plJPEG.h"
#include "../plMessage/plVaultNotifyMsg.h"
#include "../plNetClientComm/plNetClientComm.h"
#define KI_CONSTANTS_ONLY
#include "../../FeatureLib/pfMessage/pfKIMsg.h" // for KI level constants =(
#undef KI_CONSTANTS_ONLY
#pragma warning(pop)
#include "../plNetGameLib/plNetGameLib.h"
#endif // def CLIENT
#include "Intern.h"
#include <malloc.h>

View File

@ -0,0 +1,46 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plAgeInfoSource_h_inc
#define plAgeInfoSource_h_inc
///////////////////////////////////////////////////////////////////
class plUnifiedTime;
class plUUID;
class plAgeInfoSource
{
public:
// current time in current age
virtual const plUnifiedTime * GetAgeTime( void ) const = 0;
// name of current age
virtual const char * GetAgeName( void ) const = 0;
// unique identifier for this age instance
virtual const plUUID * GetAgeGuid( void ) const = 0;
};
#endif

View File

@ -0,0 +1,85 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plDniCoordinateInfo.cpp
*
***/
#include "Pch.h"
#pragma hdrstop
#ifdef CLIENT
///////////////////////////////////////////////////////////////////
const UInt8 plDniCoordinateInfo::StreamVersion = 1;
plDniCoordinateInfo::plDniCoordinateInfo()
: fHSpans(0)
, fVSpans(0)
, fTorans(0)
{
}
void plDniCoordinateInfo::CopyFrom( const plDniCoordinateInfo * other )
{
hsRAMStream stream;
plCreatable * otherNonConst = const_cast<plDniCoordinateInfo*>( other ); // because plCreatable Write isn't const, but should be.
otherNonConst->Write( &stream, nil );
stream.Rewind();
Read( &stream, nil );
}
void plDniCoordinateInfo::Read( hsStream* s, hsResMgr* mgr )
{
UInt8 streamVer;
s->ReadSwap( &streamVer );
if ( streamVer==StreamVersion )
{
s->ReadSwap( &fHSpans );
s->ReadSwap( &fVSpans );
s->ReadSwap( &fTorans );
}
}
void plDniCoordinateInfo::Write( hsStream* s, hsResMgr* mgr )
{
s->WriteSwap( StreamVersion );
s->WriteSwap( fHSpans );
s->WriteSwap( fVSpans );
s->WriteSwap( fTorans );
}
std::string plDniCoordinateInfo::AsStdString( int level ) const
{
std::string result;
std::string space( level, ' ' );
xtl::format( result, "%sDniCoords[%d,%d,%d]", space.c_str(), fHSpans, fVSpans, fTorans );
return result;
}
#endif // def CLIENT

View File

@ -0,0 +1,72 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plDniCoordinateInfo_h_inc
#define plDniCoordinateInfo_h_inc
#include "hsConfig.h"
#include "hsStlUtils.h"
#include "../pnFactory/plCreatable.h"
///////////////////////////////////////////////////////////////////
class hsStream;
class hsResMgr;
class plDniCoordinateInfo : public plCreatable
{
static const UInt8 StreamVersion;
protected:
// spherical coords (rho,theta,phi)
int fHSpans; // horizontal distance in d'ni spans to point P from origin O
int fVSpans; // vertical distance in d'ni spans to point P from origin O
int fTorans; // angle in d'ni torans from the zero vector to line OP.
public:
plDniCoordinateInfo();
CLASSNAME_REGISTER( plDniCoordinateInfo );
GETINTERFACE_ANY( plDniCoordinateInfo, plCreatable );
int GetHSpans( void ) const { return fHSpans;}
void SetHSpans( int v ) { fHSpans = v; }
int GetVSpans( void ) const { return fVSpans;}
void SetVSpans( int v ) { fVSpans = v;}
int GetTorans( void ) const { return fTorans; }
void SetTorans( int v ) { fTorans = v; }
void CopyFrom( const plDniCoordinateInfo * other );
void Read( hsStream* s, hsResMgr* mgr );
void Write( hsStream* s, hsResMgr* mgr );
// debug
std::string AsStdString( int level=0 ) const;
};
#endif // plDniCoordinateInfo_h_inc

View File

@ -0,0 +1,34 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plVault.cpp
*
***/
#include "Pch.h"
#pragma hdrstop

View File

@ -0,0 +1,48 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plVault.h
*
***/
#ifndef PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PLVAULT_H
#define PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PLVAULT_H
#include "../pnUtils/pnUtils.h"
#include "../pnNetBase/pnNetBase.h"
#include "../pnNetProtocol/pnNetProtocol.h"
#include "../pnAsyncCore/pnAsyncCore.h"
#include "plVaultConstants.h"
#include "plVaultNodeAccess.h"
#ifdef CLIENT
#include "plVaultClientApi.h"
#endif
#endif // PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PLVAULT_H

View File

@ -0,0 +1,478 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.h
*
***/
#ifdef CLIENT
#ifdef PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PLVAULTCLIENTAPI_H
#error "Header $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PLVAULTCLIENTAPI_H
/*****************************************************************************
*
* VaultCallback
*
***/
struct RelVaultNode;
struct VaultCallback {
struct IVaultCallback * internal;
virtual void AddedChildNode (
RelVaultNode * parent,
RelVaultNode * child
) = 0;
virtual void RemovingChildNode (
RelVaultNode * parent,
RelVaultNode * child
) = 0;
virtual void ChangedNode (
RelVaultNode * changedNode
) = 0;
};
void VaultRegisterCallback (VaultCallback * cb);
void VaultUnregisterCallback (VaultCallback * cb);
/*****************************************************************************
*
* RelVaultNode
* A "relational" vault node (contains child and parent node linkage)
*
* NOTE: This API is not thread-safe and therefore not suitable for use
* in server applications.
*
***/
struct RelVaultNode : NetVaultNode {
struct IRelVaultNode * state;
RelVaultNode ();
~RelVaultNode ();
bool IsParentOf (unsigned nodeId, unsigned maxDepth);
bool IsChildOf (unsigned nodeId, unsigned maxDepth);
void GetRootIds (ARRAY(unsigned) * nodeIds);
unsigned RemoveChildNodes (unsigned maxDepth); // returns # of nodes removed
void GetChildNodeIds (
ARRAY(unsigned) * nodeIds,
unsigned maxDepth
);
void GetParentNodeIds (
ARRAY(unsigned) * nodeIds,
unsigned maxDepth
);
void GetMatchingChildNodeIds (
NetVaultNode * templateNode,
ARRAY(unsigned) * nodeIds,
unsigned maxDepth
);
void GetMatchingParentNodeIds (
NetVaultNode * templateNode,
ARRAY(unsigned) * nodeIds,
unsigned maxDepth
);
// returns first matching node found
RelVaultNode * GetParentNodeIncRef (
NetVaultNode * templateNode,
unsigned maxDepth
);
RelVaultNode * GetChildNodeIncRef (
NetVaultNode * templateNode,
unsigned maxDepth
);
RelVaultNode * GetChildNodeIncRef (
unsigned nodeType,
unsigned maxDepth
);
RelVaultNode * GetChildFolderNodeIncRef (
unsigned folderType,
unsigned maxDepth
);
RelVaultNode * GetChildPlayerInfoListNodeIncRef (
unsigned folderType,
unsigned maxDepth
);
RelVaultNode * GetChildAgeInfoListNodeIncRef (
unsigned folderType,
unsigned maxDepth
);
// returns all matching nodes found
void GetChildNodesIncRef (
unsigned maxDepth,
ARRAY(RelVaultNode*) * nodes
);
void GetChildNodesIncRef (
NetVaultNode * templateNode,
unsigned maxDepth,
ARRAY(RelVaultNode*) * nodes
);
void GetChildNodesIncRef (
unsigned nodeType,
unsigned maxDepth,
ARRAY(RelVaultNode*) * nodes
);
void GetChildFolderNodesIncRef (
unsigned folderType,
unsigned maxDepth,
ARRAY(RelVaultNode*) * nodes
);
unsigned GetRefOwnerId (unsigned parentId);
bool BeenSeen (unsigned parentId) const;
void SetSeen (unsigned parentId, bool seen);
// logging
void Print (const wchar tag[], FStateDump dumpProc, unsigned level);
void PrintTree (FStateDump dumpProc, unsigned level);
// AgeInfoNode-specific (and it checks!)
RelVaultNode * GetParentAgeLinkIncRef ();
};
/*****************************************************************************
*
* Vault Initialize
*
***/
void VaultInitialize ();
void VaultDestroy ();
void VaultUpdate ();
/*****************************************************************************
*
* Generic vault access
*
***/
RelVaultNode * VaultGetNodeIncRef (
unsigned nodeId
);
RelVaultNode * VaultGetNodeIncRef (
NetVaultNode * templateNode
);
// VaultAddChildNode will download the child node if necessary
// the parent exists locally before making the callback.
typedef void (*FVaultAddChildNodeCallback)(
ENetError result,
void * param
);
void VaultAddChildNode (
unsigned parentId,
unsigned childId,
unsigned ownerId,
FVaultAddChildNodeCallback callback, // optional
void * param // optional
);
void VaultAddChildNodeAndWait (
unsigned parentId,
unsigned childId,
unsigned ownerId
);
typedef void (*FVaultRemoveChildNodeCallback)(
ENetError result,
void * param
);
void VaultRemoveChildNode (
unsigned parentId,
unsigned childId,
FVaultRemoveChildNodeCallback callback,
void * param
);
void VaultSetNodeSeen (
unsigned nodeId,
bool seen
);
void VaultDeleteNode (
unsigned nodeId
);
void VaultPublishNode (
unsigned nodeId,
const wchar deviceName[]
);
void VaultSendNode (
RelVaultNode* srcNode,
unsigned dstPlayerId
);
typedef void (*FVaultCreateNodeCallback)(
ENetError result,
void * state,
void * param,
RelVaultNode * node
);
void VaultCreateNode ( // non-blocking
plVault::NodeTypes nodeType,
FVaultCreateNodeCallback callback,
void * state,
void * param
);
void VaultCreateNode ( // non-blocking
NetVaultNode * templateNode,
FVaultCreateNodeCallback callback,
void * state,
void * param
);
RelVaultNode * VaultCreateNodeAndWaitIncRef ( // block until completion. returns node. nil --> failure
plVault::NodeTypes nodeType,
ENetError * result
);
RelVaultNode * VaultCreateNodeAndWaitIncRef ( // block until completion. returns node. nil --> failure
NetVaultNode * templateNode,
ENetError * result
);
void VaultForceSaveNodeAndWait (
NetVaultNode * node
);
typedef void (*FVaultFindNodeCallback)(
ENetError result,
void * param,
unsigned nodeIdCount,
const unsigned nodeIds[]
);
void VaultFindNodes (
NetVaultNode * templateNode,
FVaultFindNodeCallback callback,
void * param
);
void VaultFindNodesAndWait (
NetVaultNode * templateNode,
ARRAY(unsigned) * nodeIds
);
void VaultLocalFindNodes (
NetVaultNode * templateNode,
ARRAY(unsigned) * nodeIds
);
void VaultFetchNodesAndWait ( // Use VaultGetNodeIncRef to access the fetched nodes
const unsigned nodeIds[],
unsigned count,
bool force = false
);
typedef void (*FVaultInitAgeCallback)(
ENetError result,
void * state,
void * param,
unsigned ageVaultId,
unsigned ageInfoVaultId
);
void VaultInitAge (
const class plAgeInfoStruct * info,
const Uuid & parentAgeInstId,
FVaultInitAgeCallback callback,
void * state,
void * param
);
/*****************************************************************************
*
* Player Vault Access
*
***/
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 Uuid & 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);
bool VaultRegisterVisitAgeAndWait (const plAgeLinkStruct * link);
bool VaultUnregisterOwnedAgeAndWait (const plAgeInfoStruct * info);
bool VaultUnregisterVisitAgeAndWait (const plAgeInfoStruct * info);
RelVaultNode * VaultFindChronicleEntryIncRef (const wchar entryName[], int entryType = -1);
bool VaultHasChronicleEntry (const wchar entryName[], int entryType = -1);
// if entry of same name and type already exists, value is updated
void VaultAddChronicleEntryAndWait (
const wchar entryName[],
int entryType,
const wchar entryValue[]
);
bool VaultAmIgnoringPlayer (unsigned playerId);
unsigned VaultGetKILevel ();
bool VaultGetCCRStatus (); // true=online, false=away
bool VaultSetCCRStatus (bool online); // true=online, false=away
void VaultDump (const wchar tag[], unsigned vaultId, FStateDump dumpProc);
void VaultDump (const wchar tag[], unsigned vaultId);
bool VaultAmInMyPersonalAge ();
bool VaultAmInMyNeighborhoodAge ();
bool VaultAmOwnerOfCurrentAge ();
bool VaultAmCzarOfCurrentAge ();
bool VaultAmOwnerOfAge (const Uuid & ageInstId);
bool VaultAmCzarOfAge (const Uuid & ageInstId);
bool VaultRegisterMTStationAndWait (
const wchar stationName[],
const wchar linkBackSpawnPtObjName[]
);
void VaultProcessPlayerInbox ();
/*****************************************************************************
*
* Age Vault Access
*
***/
#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 entryName[], int entryType = -1);
// if entry of same name and type already exists, value is updated
void VaultAddAgeChronicleEntry (
const wchar entryName[],
int entryType,
const wchar entryValue[]
);
RelVaultNode * VaultAgeAddDeviceAndWaitIncRef (const wchar deviceName[]); // blocks until completion
void VaultAgeRemoveDevice (const wchar deviceName[]);
bool VaultAgeHasDevice (const wchar deviceName[]);
RelVaultNode * VaultAgeGetDeviceIncRef (const wchar deviceName[]);
RelVaultNode * VaultAgeSetDeviceInboxAndWaitIncRef (const wchar deviceName[], const wchar inboxName[]); // blocks until completion
RelVaultNode * VaultAgeGetDeviceInboxIncRef (const wchar deviceName[]);
void VaultClearDeviceInboxMap ();
bool VaultAgeGetAgeSDL (class plStateDataRecord * out);
void VaultAgeUpdateAgeSDL (const class plStateDataRecord * rec);
unsigned VaultAgeGetAgeTime ();
bool VaultAgeGetSubAgeLink (
const plAgeInfoStruct * info,
plAgeLinkStruct * link
);
bool VaultAgeFindOrCreateSubAgeLinkAndWait (
const plAgeInfoStruct * info,
plAgeLinkStruct * link,
const Uuid & parentAgeInstId
);
bool VaultAgeFindOrCreateChildAgeLinkAndWait (
const wchar parentAgeName[], // nil --> current age, non-nil --> owned age by given name
const plAgeInfoStruct * info,
plAgeLinkStruct * link
);
/*****************************************************************************
*
* CCR Vault Access
*
***/
void VaultCCRDumpPlayers();
/*****************************************************************************
*
* Vault download
*
***/
typedef void (*FVaultDownloadCallback)(
ENetError result,
void * param
);
typedef void (*FVaultProgressCallback)(
unsigned total,
unsigned curr,
void * param
);
void VaultDownload (
const wchar tag[],
unsigned vaultId,
FVaultDownloadCallback callback,
void * cbParam,
FVaultProgressCallback progressCallback,
void * cbProgressParam
);
void VaultDownloadAndWait (
const wchar tag[],
unsigned vaultId,
FVaultProgressCallback progressCallback,
void * cbProgressParam
);
void VaultCull (
unsigned vaultId
);
/*****************************************************************************
*
* Vault global node handling
*
***/
RelVaultNode * VaultGetSystemNodeIncRef ();
RelVaultNode * VaultGetGlobalInboxIncRef ();
#endif // def CLIENT

View File

@ -0,0 +1,126 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plVaultConstants.cpp
*
***/
#include "Pch.h"
#pragma hdrstop
namespace plVault {
#ifdef CLIENT
const char * NodeTypeStr( int type, bool pretty )
{
if (!pretty)
{
switch ( type )
{
case kNodeType_VNodeMgrPlayer: return "PLR";
case kNodeType_VNodeMgrAge: return "AGE";
case kNodeType_Folder: return "FLDR";
case kNodeType_PlayerInfo: return "PLRINFO";
case kNodeType_System: return "SYSTEM";
case kNodeType_Image: return "IMG";
case kNodeType_TextNote: return "TXT";
case kNodeType_SDL: return "SDL";
case kNodeType_AgeLink: return "LINK";
case kNodeType_Chronicle: return "CRN";
case kNodeType_PlayerInfoList: return "PLRINFOLIST";
case kNodeType_AgeInfo: return "AGEINFO";
case kNodeType_AgeInfoList: return "AGEINFOLIST";
case kNodeType_MarkerGame: return "MRKRGAME";
default: return "???";
}
}
else
{
switch ( type )
{
case kNodeType_VNodeMgrPlayer: return "Player";
case kNodeType_VNodeMgrAge: return "Age";
case kNodeType_Folder: return "Folder";
case kNodeType_PlayerInfo: return "Player Info";
case kNodeType_System: return "System";
case kNodeType_Image: return "Image";
case kNodeType_TextNote: return "Text Note";
case kNodeType_SDL: return "SDL";
case kNodeType_AgeLink: return "Age Link";
case kNodeType_Chronicle: return "Chronicle";
case kNodeType_PlayerInfoList: return "Player Info List";
case kNodeType_AgeInfo: return "Age Info";
case kNodeType_AgeInfoList: return "Age Info List";
case kNodeType_MarkerGame: return "Marker Game";
default: return "UNKNOWN";
}
}
}
const char * StandardNodeStr( int type )
{
switch ( type )
{
case kUserDefinedNode: return "Generic";
case kInboxFolder: return "InboxFolder";
case kBuddyListFolder: return "BuddyListFolder";
case kPeopleIKnowAboutFolder: return"PeopleIKnowAboutFolder";
case kIgnoreListFolder: return "IgnoreListFolder";
case kVaultMgrGlobalDataFolder: return "VaultMgrGlobalDataFolder";
case kChronicleFolder: return "ChronicleFolder";
case kAvatarOutfitFolder: return "AvatarOutfitFolder";
case kAgeTypeJournalFolder: return "AgeTypeJournalFolder";
case kSubAgesFolder: return "SubAgesFolder";
case kDeviceInboxFolder: return "DeviceInboxFolder";
case kAgeInstanceSDLNode: return "AgeInstanceSDLNode";
case kAgeGlobalSDLNode: return "AgeGlobalSDLNode";
case kHoodMembersFolder: return "HoodMembersFolder";
case kAllPlayersFolder: return "AllPlayers";
case kAgeMembersFolder: return "AgeMembersFolder";
case kAgeJournalsFolder: return "AgeJournalsFolder";
case kAgeDevicesFolder: return "AgeDevicesFolder";
case kAllAgeGlobalSDLNodesFolder: return "AllAgeGlobalSDLNodesFolder";
case kPlayerInfoNode: return "PlayerInfoNode";
case kPublicAgesFolder: return "PublicAgesFolder";
case kAgesIOwnFolder: return "AgesIOwnFolder";
case kAgesICanVisitFolder: return "AgesICanVisitFolder";
case kAvatarClosetFolder: return "AvatarClosetFolder";
case kCanVisitFolder: return "CanVisitFolder";
case kAgeOwnersFolder: return "AgeOwnersFolder";
case kAgeInfoNode: return "AgeInfoNode";
case kSystemNode: return "SystemNode";
case kPlayerInviteFolder: return "PlayerInviteFolder";
case kCCRPlayersFolder: return "CCRPlayersFolder";
case kGlobalInboxFolder: return "GlobalInboxFolder";
case kChildAgesFolder: return "ChildAgesFolder";
case kGameScoresFolder: return "GameScoresFolder";
default: return "UNKNOWN";
}
}
#endif // def CLIENT
} // namespace plVault

View File

@ -0,0 +1,175 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plVaultConstants.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PLVAULTCONSTANTS_H
#error "Header $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plVaultConstants.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PLVAULTCONSTANTS_H
////////////////////////////////////////////////////////////////////
// plVault: Plasma Network File System
//
class plAgeInfoSource;
////////////////////////////////////////////////////////////////////
namespace plVault {
// ONLY APPEND TO THIS ENUM.
// Many of these values are stored in db.
// These are also commonly used as the Initialized Contexts in various node init tasks.
// These values may not change unless all clients, servers, and databases are simultaneously
// replaced; so forget it, basically. =)
enum StandardNodes {
// Just a node.
kUserDefinedNode = 0,
// Every vnode mgr has an inbox.
kInboxFolder,
// player buddies list.
kBuddyListFolder,
// player ignore list.
kIgnoreListFolder,
// people I know about folder.
kPeopleIKnowAboutFolder,
// vault manager place to store its stuff.
kVaultMgrGlobalDataFolder,
// player chronicle.
kChronicleFolder,
// player avatar outfit.
kAvatarOutfitFolder,
// player Age Type Journals.
kAgeTypeJournalFolder,
// age Sub Ages list.
kSubAgesFolder,
// an imager's inbox.
kDeviceInboxFolder,
// hood members folder.
kHoodMembersFolder, // DO NOT DELETE without MarkD's permission.
// all players folder.
kAllPlayersFolder,
// folder for keeping age members in
kAgeMembersFolder,
// List of player's KI Age journals.
kAgeJournalsFolder,
// an age's list of devices (imagers, whatever).
kAgeDevicesFolder,
// an sdl node that applies to one specific instance of an age.
kAgeInstanceSDLNode,
// an sdl node that applies to all ages by the same filename.
kAgeGlobalSDLNode,
// people who are invited to visit an age
kCanVisitFolder,
// people who are owners of an age
kAgeOwnersFolder,
// global folder for game servers
kAllAgeGlobalSDLNodesFolder,
// a player's player info node. used in init task as the init context for the node
kPlayerInfoNode,
// global folder: ages that are public
kPublicAgesFolder,
// ages a player owns (personal age bookshelf comes from here)
kAgesIOwnFolder,
// ages a player can visit
kAgesICanVisitFolder,
// the player's closet
kAvatarClosetFolder,
// an age's info node. used in age init task.
kAgeInfoNode,
// the system status node
kSystemNode,
// a players invite keyring
kPlayerInviteFolder,
// CCR players folder
kCCRPlayersFolder,
// Global Inbox folder
kGlobalInboxFolder,
// Child Age folder node list
kChildAgesFolder,
// Game Scores folder
kGameScoresFolder,
// THIS MUST BE THE LAST ENUM VALUE
kLastStandardNode,
};
// All possible node types. These values may not change unless all clients,
// servers, and databases are simultaneously replaced; so forget it, basically. =)
enum NodeTypes {
kNodeType_Invalid,
kNodeType_VNodeMgrLow, // low marker for range of VNodeMgr types
kNodeType_VNodeMgrPlayer,
kNodeType_VNodeMgrAge,
kNodeType_VNodeMgr_UNUSED00,
kNodeType_VNodeMgr_UNUSED01,
kNodeType_VNodeMgr_UNUSED02,
kNodeType_VNodeMgr_UNUSED03,
kNodeType_VNodeMgrHigh = kNodeType_VNodeMgrLow + 20, // high marker for range of VNodeMgr client types
kNodeType_Folder,
kNodeType_PlayerInfo,
kNodeType_System,
kNodeType_Image,
kNodeType_TextNote,
kNodeType_SDL,
kNodeType_AgeLink,
kNodeType_Chronicle,
kNodeType_PlayerInfoList,
kNodeType_UNUSED00,
kNodeType_UNUSED01,
kNodeType_AgeInfo,
kNodeType_AgeInfoList,
kNodeType_MarkerGame,
};
// All possible text note types
enum NoteTypes {
kNoteType_Generic,
kNoteType_CCRPetition,
kNoteType_Device,
kNoteType_Invite,
kNoteType_Visit,
kNoteType_UnVisit,
kNumNoteTypes
};
enum NoteSubTypes {
kNoteSubType_Generic,
};
//============================================================================
#ifdef CLIENT
const char * NodeTypeStr( int type, bool pretty=false );
const char * StandardNodeStr( int type );
#endif
};

View File

@ -0,0 +1,34 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plVaultCreatable_h_inc
#define plVaultCreatable_h_inc
#include "../pnFactory/plCreator.h"
#include "plDniCoordinateInfo.h"
REGISTER_CREATABLE( plDniCoordinateInfo );
#endif // plVaultCreatable_h_inc

View File

@ -0,0 +1,457 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
/*****************************************************************************
*
* $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.h
*
***/
#ifdef PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PLVAULTNODEACCESS_H
#error "Header $/Plasma20/Sources/Plasma/PubUtilLib/plVault/plVaultNodeAccess.h included more than once"
#endif
#define PLASMA20_SOURCES_PLASMA_PUBUTILLIB_PLVAULT_PLVAULTNODEACCESS_H
// 'Old' system is full of compiler warnings at /W4, so just hide them
#pragma warning(push, 0)
#include "hsStlUtils.h"
#pragma warning(pop)
/*****************************************************************************
*
* VaultNode field access strutures
*
***/
class plAgeInfoStruct;
class plAgeLinkStruct;
struct plSpawnPointInfo;
#ifdef CLIENT
typedef std::vector<plSpawnPointInfo> plSpawnPointVec;
#endif
//============================================================================
// Volatile Vault Node Fields
//============================================================================
qword GetNodeVolatileFields(NetVaultNode* node);
//============================================================================
// NetVaultNodeAccess
//============================================================================
struct NetVaultNodeAccess {
NetVaultNode * base;
qword & fieldFlags;
qword & dirtyFlags;
NetVaultNodeAccess (NetVaultNode * node);
NetVaultNodeAccess (const NetVaultNodeAccess &); // not implemented
const NetVaultNodeAccess & operator= (const NetVaultNodeAccess &); // not implemented
};
//============================================================================
// VaultPlayerNode
//============================================================================
struct VaultPlayerNode : NetVaultNodeAccess {
static const qword kPlayerName = NetVaultNode::kIString64_1;
static const qword kAvatarShapeName = NetVaultNode::kString64_1;
static const qword kDisabled = NetVaultNode::kInt32_1;
static const qword kExplorer = NetVaultNode::kInt32_2; // explorer = 1, visitor = 0
static const qword kOnlineTime = NetVaultNode::kUInt32_1;
static const qword kAccountUuid = NetVaultNode::kUuid_1;
static const qword kInviteUuid = NetVaultNode::kUuid_2;
// Treat these as read-only or node flag fields will become invalid
// Threaded apps: Must be accessed with node->critsect locked
wchar *& playerName;
wchar *& avatarShapeName;
int & disabled;
unsigned & onlineTime;
Uuid & accountUuid;
Uuid & 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 v[]);
void SetAvatarShapeName (const wchar v[]);
void SetDisabled (int v);
void SetOnlineTime (unsigned v);
void SetAccountUuid (const Uuid & v);
void SetInviteUuid (const Uuid & v);
void SetExplorer (int v);
};
//============================================================================
// VaultPlayerInfoNode
//============================================================================
struct VaultPlayerInfoNode : NetVaultNodeAccess {
static const qword kPlayerId = NetVaultNode::kUInt32_1;
static const qword kPlayerName = NetVaultNode::kIString64_1;
static const qword kAgeInstName = NetVaultNode::kString64_1; // name of age player is currently in
static const qword kAgeInstUuid = NetVaultNode::kUuid_1; // guid of age player is currently in
static const qword kOnline = NetVaultNode::kInt32_1; // whether or not player is online
static const qword 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 *& playerName;
wchar *& ageInstName;
Uuid & ageInstUuid;
int & online;
int & ccrLevel;
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 v[]);
void SetAgeInstName (const wchar v[]);
void SetAgeInstUuid (const Uuid & v);
void SetOnline (int v);
void SetCCRLevel (int v);
};
//============================================================================
// VaultFolderNode
//============================================================================
struct VaultFolderNode : NetVaultNodeAccess {
static const qword kFolderType = NetVaultNode::kInt32_1;
static const qword 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 *& folderName;
VaultFolderNode (NetVaultNode * node);
VaultFolderNode (const VaultFolderNode &); // not implemented
const VaultFolderNode & operator= (const VaultFolderNode &); // not implemented
// Threaded apps: Must be called with node->critsect locked
void SetFolderName (const wchar v[]);
void SetFolderType (int v);
};
//============================================================================
// VaultPlayerInfoListNode
//============================================================================
struct VaultPlayerInfoListNode : VaultFolderNode {
VaultPlayerInfoListNode (NetVaultNode * node);
VaultPlayerInfoListNode (const VaultPlayerInfoListNode &); // not implemented
const VaultPlayerInfoListNode & operator= (const VaultPlayerInfoListNode &); // not implemented
};
//============================================================================
// VaultAgeInfoListNode
//============================================================================
struct VaultAgeInfoListNode : VaultFolderNode {
VaultAgeInfoListNode (NetVaultNode * node);
VaultAgeInfoListNode (const VaultAgeInfoListNode &); // not implemented
const VaultAgeInfoListNode & operator= (const VaultAgeInfoListNode &); // not implemented
};
//============================================================================
// VaultChronicleNode
//============================================================================
struct VaultChronicleNode : NetVaultNodeAccess {
static const qword kEntryType = NetVaultNode::kInt32_1;
static const qword kEntryName = NetVaultNode::kString64_1;
static const qword 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 *& entryName;
wchar *& entryValue;
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 v[]);
void SetEntryValue (const wchar v[]);
};
//============================================================================
// VaultSDLNode
//============================================================================
struct VaultSDLNode : NetVaultNodeAccess {
static const qword kSDLName = NetVaultNode::kString64_1;
static const qword kSDLIdent = NetVaultNode::kInt32_1;
static const qword kSDLData = NetVaultNode::kBlob_1;
int & sdlIdent;
wchar *& sdlName;
byte *& 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 v[]);
#ifdef CLIENT
bool GetStateDataRecord (class plStateDataRecord * out, unsigned readOptions = 0);
void SetStateDataRecord (const class plStateDataRecord * rec, unsigned writeOptions = 0);
void InitStateDataRecord (const wchar sdlRecName[], unsigned writeOptions = 0);
#endif // def CLIENT
};
//============================================================================
// VaultAgeLinkNode
//============================================================================
struct VaultAgeLinkNode : NetVaultNodeAccess {
static const qword kUnlocked = NetVaultNode::kInt32_1;
static const qword kVolatile = NetVaultNode::kInt32_2;
static const qword kSpawnPoints = NetVaultNode::kBlob_1;
int & unlocked;
int & volat;
byte *& 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);
#ifdef CLIENT
bool CopyTo (plAgeLinkStruct * link);
void AddSpawnPoint (const plSpawnPointInfo & point); // will only add if not there already.
void RemoveSpawnPoint (const char spawnPtName[]);
bool HasSpawnPoint (const char spawnPtName[]) const;
bool HasSpawnPoint (const plSpawnPointInfo & point) const; // compares spawn name only, not title.
void GetSpawnPoints (plSpawnPointVec * out) const;
void SetSpawnPoints (const plSpawnPointVec & in);
#endif
};
//============================================================================
// VaultImageNode
//============================================================================
struct VaultImageNode : NetVaultNodeAccess {
enum ImageTypes { kNone=0, kJPEG=1 };
static const qword kImageType = NetVaultNode::kInt32_1;
static const qword kImageTitle = NetVaultNode::kString64_1;
static const qword kImageData = NetVaultNode::kBlob_1;
wchar *& title;
int & imgType;
byte *& imgData;
unsigned & imgDataLen;
VaultImageNode (NetVaultNode * node);
VaultImageNode (const VaultImageNode &); // not implemented
const VaultImageNode & operator= (const VaultImageNode &); // not implemented
void SetImageTitle (const wchar v[]);
void SetImageType (int v);
void SetImageData (const byte buffer[], unsigned bytes);
#ifdef CLIENT
void StuffImage (class plMipmap * src);
bool ExtractImage (class plMipmap ** dst);
#endif
};
//============================================================================
// VaultCliImageNode
//============================================================================
#ifdef CLIENT
struct VaultCliImageNode : VaultImageNode {
class plMipmap * fMipmap;
VaultCliImageNode (NetVaultNode * node);
VaultCliImageNode (const VaultCliImageNode &); // not implemented
const VaultCliImageNode & operator= (const VaultCliImageNode &); // not implemented
};
#endif // def CLIENT
//============================================================================
// VaultTextNoteNode
//============================================================================
struct VaultTextNoteNode : NetVaultNodeAccess {
static const qword kNoteType = NetVaultNode::kInt32_1;
static const qword kNoteSubType = NetVaultNode::kInt32_2;
static const qword kNoteTitle = NetVaultNode::kString64_1;
static const qword kNoteText = NetVaultNode::kText_1;
int & noteType;
int & noteSubType;
wchar *& noteTitle;
wchar *& noteText;
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 v[]);
void SetNoteText (const wchar v[]);
#ifdef CLIENT
// for kNoteType_Visit/UnVisit
void SetVisitInfo (const plAgeInfoStruct & info);
bool GetVisitInfo (plAgeInfoStruct * info);
#endif
};
//============================================================================
// VaultAgeNode
//============================================================================
struct VaultAgeNode : NetVaultNodeAccess {
static const qword kAgeInstanceGuid = NetVaultNode::kUuid_1;
static const qword kParentAgeInstanceGuid = NetVaultNode::kUuid_2;
static const qword kAgeName = NetVaultNode::kString64_1;
Uuid & ageInstUuid;
Uuid & parentAgeInstUuid;
wchar *& ageName;
VaultAgeNode (NetVaultNode * node);
VaultAgeNode (const VaultAgeNode &); // not implemented
const VaultAgeNode & operator= (const VaultAgeNode &); // not implemented
void SetAgeInstGuid (const Uuid & v);
void SetParentAgeInstGuid (const Uuid & v);
void SetAgeName (const wchar v[]);
};
//============================================================================
// VaultAgeInfoNode
//============================================================================
struct VaultAgeInfoNode : NetVaultNodeAccess {
static const qword kAgeFilename = NetVaultNode::kString64_2; // "Garden"
static const qword kAgeInstanceName = NetVaultNode::kString64_3; // "Eder Kemo"
static const qword kAgeUserDefinedName = NetVaultNode::kString64_4; // "Joe's"
static const qword kAgeInstanceGuid = NetVaultNode::kUuid_1; // 6278b081-342a-4229-ac1b-a0b8a2658390
static const qword kParentAgeInstanceGuid = NetVaultNode::kUuid_2; // 9192be7f-89ef-41bc-83db-79afe451e399
static const qword kAgeDescription = NetVaultNode::kText_1; // "Stay out!"
static const qword kAgeSequenceNumber = NetVaultNode::kInt32_1;
static const qword kIsPublic = NetVaultNode::kInt32_2;
static const qword kAgeLanguage = NetVaultNode::kInt32_3; // The language of the client that made this age
static const qword kAgeId = NetVaultNode::kUInt32_1;
static const qword kAgeCzarId = NetVaultNode::kUInt32_2;
static const qword kAgeInfoFlags = NetVaultNode::kUInt32_3;
wchar *& ageFilename;
wchar *& ageInstName;
wchar *& ageUserDefinedName;
Uuid & ageInstUuid;
Uuid & parentAgeInstUuid;
int & ageSequenceNumber;
int & ageIsPublic;
int & ageLanguage;
unsigned & ageId;
unsigned & ageCzarId;
unsigned & ageInfoFlags;
wchar *& ageDescription;
VaultAgeInfoNode (NetVaultNode * node);
VaultAgeInfoNode (const VaultAgeInfoNode &); // not implemented
const VaultAgeInfoNode & operator= (const VaultAgeInfoNode &); // not implemented
void SetAgeFilename (const wchar v[]);
void SetAgeInstName (const wchar v[]);
void SetAgeUserDefinedName (const wchar v[]);
void SetAgeInstGuid (const Uuid & v);
void SetParentAgeInstGuid (const Uuid & 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 v[]);
#ifdef CLIENT
const class plUnifiedTime * GetAgeTime () const;
void CopyFrom (const plAgeInfoStruct * info);
void CopyTo (plAgeInfoStruct * info) const;
#endif // def CLIENT
};
//============================================================================
// VaultSystemNode
//============================================================================
struct VaultSystemNode : NetVaultNodeAccess {
static const qword 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);
};
//============================================================================
// VaultMarkerGameNode
//============================================================================
struct VaultMarkerGameNode : NetVaultNodeAccess {
static const qword kGameName = NetVaultNode::kText_1;
static const qword kGameGuid = NetVaultNode::kUuid_1;
wchar *& gameName;
Uuid & gameGuid;
VaultMarkerGameNode (NetVaultNode * node);
VaultMarkerGameNode (const VaultMarkerGameNode &); // not implemented
const VaultMarkerGameNode & operator= (const VaultMarkerGameNode &); // not implemented
void SetGameName (const wchar v[]);
void SetGameGuid (const Uuid & v);
};