2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-13 18:17:49 -04:00

Replace Uuid with plUUID EVERYWHERE.

This commit is contained in:
Darryl Pogue
2012-12-29 02:05:23 -08:00
parent a0641ba66b
commit bcf6e97d23
78 changed files with 427 additions and 892 deletions

View File

@ -59,9 +59,9 @@ pyBlueSpiralGame::pyBlueSpiralGame(pfGameCli* client): pyGameCli(client)
gameClient = nil; // wrong type, just clear it out
}
bool pyBlueSpiralGame::IsBlueSpiralGame(std::wstring guid)
bool pyBlueSpiralGame::IsBlueSpiralGame(plString& guid)
{
Uuid gameUuid(guid.c_str());
plUUID gameUuid(guid);
return gameUuid == kGameTypeId_BlueSpiral;
}
@ -87,4 +87,4 @@ void pyBlueSpiralGame::HitCloth(int clothNum)
pfGmBlueSpiral* blueSpiral = pfGmBlueSpiral::ConvertNoRef(gameClient);
blueSpiral->HitCloth(clothNum);
}
}
}

View File

@ -68,7 +68,7 @@ public:
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaMethods(std::vector<PyMethodDef>& methods);
static bool IsBlueSpiralGame(std::wstring guid);
static bool IsBlueSpiralGame(plString& guid);
static void JoinCommonBlueSpiralGame(pyKey& callbackKey, unsigned gameID);
void StartGame();

View File

@ -65,31 +65,20 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsBlueSpiralGame, args, "Params: typeID\nRetur
PyObject* textObj;
if (!PyArg_ParseTuple(args, "O", &textObj))
{
PyErr_SetString(PyExc_TypeError, "PtIsBlueSpiralGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsBlueSpiralGame expects a string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
if (PyString_CheckEx(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
plString text = PyString_AsStringEx(textObj);
bool retVal = pyBlueSpiralGame::IsBlueSpiralGame(text);
delete [] text;
PYTHON_RETURN_BOOL(retVal);
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* text = PyString_AsString(textObj);
wchar_t* wText = hsStringToWString(text);
bool retVal = pyBlueSpiralGame::IsBlueSpiralGame(wText);
delete [] wText;
PYTHON_RETURN_BOOL(retVal);
}
else
{
PyErr_SetString(PyExc_TypeError, "PtIsBlueSpiralGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsBlueSpiralGame expects a string");
PYTHON_RETURN_ERROR;
}
}
@ -159,4 +148,4 @@ void pyBlueSpiralGame::AddPlasmaMethods(std::vector<PyMethodDef>& methods)
{
PYTHON_GLOBAL_METHOD(methods, PtIsBlueSpiralGame);
PYTHON_GLOBAL_METHOD(methods, PtJoinCommonBlueSpiralGame);
}
}

View File

@ -59,9 +59,9 @@ pyClimbingWallGame::pyClimbingWallGame(pfGameCli* client): pyGameCli(client)
gameClient = nil; // wrong type, just clear it out
}
bool pyClimbingWallGame::IsClimbingWallGame(std::wstring guid)
bool pyClimbingWallGame::IsClimbingWallGame(plString& guid)
{
Uuid gameUuid(guid.c_str());
plUUID gameUuid(guid);
return gameUuid == kGameTypeId_ClimbingWall;
}
@ -132,4 +132,4 @@ void pyClimbingWallGame::Panic()
pfGmClimbingWall* climbingWall = pfGmClimbingWall::ConvertNoRef(gameClient);
climbingWall->Panic();
}
}
}

View File

@ -69,7 +69,7 @@ public:
static void AddPlasmaMethods(std::vector<PyMethodDef>& methods);
static void AddPlasmaConstantsClasses(PyObject* m);
static bool IsClimbingWallGame(std::wstring guid);
static bool IsClimbingWallGame(plString& guid);
static void JoinCommonClimbingWallGame(pyKey& callbackKey, unsigned gameID);
void ChangeNumBlockers(int amountToAdjust);

View File

@ -65,31 +65,20 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsClimbingWallGame, args, "Params: typeID\nRet
PyObject* textObj;
if (!PyArg_ParseTuple(args, "O", &textObj))
{
PyErr_SetString(PyExc_TypeError, "PtIsClimbingWallGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsClimbingWallGame expects a string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
if (PyString_CheckEx(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
plString text = PyString_AsStringEx(textObj);
bool retVal = pyClimbingWallGame::IsClimbingWallGame(text);
delete [] text;
PYTHON_RETURN_BOOL(retVal);
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* text = PyString_AsString(textObj);
wchar_t* wText = hsStringToWString(text);
bool retVal = pyClimbingWallGame::IsClimbingWallGame(wText);
delete [] wText;
PYTHON_RETURN_BOOL(retVal);
}
else
{
PyErr_SetString(PyExc_TypeError, "PtIsClimbingWallGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsClimbingWallGame expects a string");
PYTHON_RETURN_ERROR;
}
}
@ -213,4 +202,4 @@ void pyClimbingWallGame::AddPlasmaConstantsClasses(PyObject* m)
PYTHON_ENUM_ELEMENT(PtClimbingWallReadyTypes, kClimbingWallReadyNumBlockers, kClimbingWallReadyNumBlockers);
PYTHON_ENUM_ELEMENT(PtClimbingWallReadyTypes, kClimbingWallReadyBlockers, kClimbingWallReadyBlockers);
PYTHON_ENUM_END(m, PtClimbingWallReadyTypes);
}
}

View File

@ -59,9 +59,9 @@ pyHeekGame::pyHeekGame(pfGameCli* client): pyGameCli(client)
gameClient = nil; // wrong type, just clear it out
}
bool pyHeekGame::IsHeekGame(std::wstring guid)
bool pyHeekGame::IsHeekGame(plString& guid)
{
Uuid gameUuid(guid.c_str());
plUUID gameUuid(guid);
return gameUuid == kGameTypeId_Heek;
}
@ -104,4 +104,4 @@ void pyHeekGame::SequenceFinished(int seq)
pfGmHeek* heek = pfGmHeek::ConvertNoRef(gameClient);
heek->SequenceFinished((EHeekSeqFinished)seq);
}
}
}

View File

@ -69,7 +69,7 @@ public:
static void AddPlasmaConstantsClasses(PyObject* m);
static void AddPlasmaMethods(std::vector<PyMethodDef>& methods);
static bool IsHeekGame(std::wstring guid);
static bool IsHeekGame(plString& guid);
static void JoinCommonHeekGame(pyKey& callbackKey, unsigned gameID);
void PlayGame(int position, uint32_t points, std::wstring name);

View File

@ -65,31 +65,20 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsHeekGame, args, "Params: typeID\nReturns tru
PyObject* textObj;
if (!PyArg_ParseTuple(args, "O", &textObj))
{
PyErr_SetString(PyExc_TypeError, "PtIsHeekGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsHeekGame expects a string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
if (PyString_CheckEx(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
plString text = PyString_AsStringEx(textObj);
bool retVal = pyHeekGame::IsHeekGame(text);
delete [] text;
PYTHON_RETURN_BOOL(retVal);
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* text = PyString_AsString(textObj);
wchar_t* wText = hsStringToWString(text);
bool retVal = pyHeekGame::IsHeekGame(wText);
delete [] wText;
PYTHON_RETURN_BOOL(retVal);
}
else
{
PyErr_SetString(PyExc_TypeError, "PtIsHeekGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsHeekGame expects a string");
PYTHON_RETURN_ERROR;
}
}
@ -224,4 +213,4 @@ void pyHeekGame::AddPlasmaMethods(std::vector<PyMethodDef>& methods)
{
PYTHON_GLOBAL_METHOD(methods, PtIsHeekGame);
PYTHON_GLOBAL_METHOD(methods, PtJoinCommonHeekGame);
}
}

View File

@ -60,9 +60,9 @@ pyMarkerGame::pyMarkerGame(pfGameCli* client): pyGameCli(client)
gameClient = nil; // wrong type, just clear it out
}
bool pyMarkerGame::IsMarkerGame(std::wstring guid)
bool pyMarkerGame::IsMarkerGame(plString& guid)
{
Uuid gameUuid(guid.c_str());
plUUID gameUuid(guid);
return gameUuid == kGameTypeId_Marker;
}
@ -164,4 +164,4 @@ void pyMarkerGame::CaptureMarker(unsigned long markerId)
pfGmMarker* marker = pfGmMarker::ConvertNoRef(gameClient);
marker->CaptureMarker(markerId);
}
}
}

View File

@ -69,7 +69,7 @@ public:
static void AddPlasmaConstantsClasses(PyObject* m);
static void AddPlasmaMethods(std::vector<PyMethodDef>& methods);
static bool IsMarkerGame(std::wstring guid);
static bool IsMarkerGame(plString& guid);
static void CreateMarkerGame(pyKey& callbackKey, unsigned gameType, std::wstring gameName, unsigned long timeLimit, std::wstring templateId);
void StartGame();

View File

@ -65,31 +65,20 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsMarkerGame, args, "Params: typeID\nReturns t
PyObject* textObj;
if (!PyArg_ParseTuple(args, "O", &textObj))
{
PyErr_SetString(PyExc_TypeError, "PtIsMarkerGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsMarkerGame expects a string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
if (PyString_CheckEx(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
plString text = PyString_AsStringEx(textObj);
bool retVal = pyMarkerGame::IsMarkerGame(text);
delete [] text;
PYTHON_RETURN_BOOL(retVal);
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* text = PyString_AsString(textObj);
wchar_t* wText = hsStringToWString(text);
bool retVal = pyMarkerGame::IsMarkerGame(wText);
delete [] wText;
PYTHON_RETURN_BOOL(retVal);
}
else
{
PyErr_SetString(PyExc_TypeError, "PtIsMarkerGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsMarkerGame expects a string");
PYTHON_RETURN_ERROR;
}
}

View File

@ -59,9 +59,9 @@ pyTTTGame::pyTTTGame(pfGameCli* client): pyGameCli(client)
gameClient = nil; // wrong type, just clear it out
}
bool pyTTTGame::IsTTTGame(std::wstring guid)
bool pyTTTGame::IsTTTGame(plString& guid)
{
Uuid gameUuid(guid.c_str());
plUUID gameUuid(guid);
return gameUuid == kGameTypeId_TicTacToe;
}
@ -95,4 +95,4 @@ void pyTTTGame::ShowBoard()
pfGmTicTacToe* ttt = pfGmTicTacToe::ConvertNoRef(gameClient);
ttt->ShowBoard();
}
}
}

View File

@ -69,7 +69,7 @@ public:
static void AddPlasmaConstantsClasses(PyObject* m);
static void AddPlasmaMethods(std::vector<PyMethodDef>& methods);
static bool IsTTTGame(std::wstring guid);
static bool IsTTTGame(plString& guid);
static void CreateTTTGame(pyKey& callbackKey, unsigned numPlayers);
static void JoinCommonTTTGame(pyKey& callbackKey, unsigned gameID, unsigned numPlayers);

View File

@ -65,31 +65,20 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsTTTGame, args, "Params: typeID\nReturns true
PyObject* textObj;
if (!PyArg_ParseTuple(args, "O", &textObj))
{
PyErr_SetString(PyExc_TypeError, "PtIsTTTGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsTTTGame expects a string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
if (PyString_CheckEx(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
plString text = PyString_AsStringEx(textObj);
bool retVal = pyTTTGame::IsTTTGame(text);
delete [] text;
PYTHON_RETURN_BOOL(retVal);
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* text = PyString_AsString(textObj);
wchar_t* wText = hsStringToWString(text);
bool retVal = pyTTTGame::IsTTTGame(wText);
delete [] wText;
PYTHON_RETURN_BOOL(retVal);
}
else
{
PyErr_SetString(PyExc_TypeError, "PtIsTTTGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsTTTGame expects a string");
PYTHON_RETURN_ERROR;
}
}
@ -189,4 +178,4 @@ void pyTTTGame::AddPlasmaMethods(std::vector<PyMethodDef>& methods)
PYTHON_GLOBAL_METHOD(methods, PtIsTTTGame);
PYTHON_GLOBAL_METHOD(methods, PtCreateTTTGame);
PYTHON_GLOBAL_METHOD(methods, PtJoinCommonTTTGame);
}
}

View File

@ -61,9 +61,9 @@ pyVarSyncGame::pyVarSyncGame(pfGameCli* client): pyGameCli(client)
gameClient = nil; // wrong type, just clear it out
}
bool pyVarSyncGame::IsVarSyncGame(std::wstring guid)
bool pyVarSyncGame::IsVarSyncGame(plString& guid)
{
Uuid gameUuid(guid.c_str());
plUUID gameUuid(guid);
return gameUuid == kGameTypeId_VarSync;
}
@ -117,4 +117,4 @@ void pyVarSyncGame::CreateNumericVar(std::wstring name, double val)
pfGmVarSync* vsync = pfGmVarSync::ConvertNoRef(gameClient);
vsync->CreateNumericVar(name.c_str(), val);
}
}
}

View File

@ -68,7 +68,7 @@ public:
static void AddPlasmaClasses(PyObject* m);
static void AddPlasmaMethods(std::vector<PyMethodDef>& methods);
static bool IsVarSyncGame(std::wstring guid);
static bool IsVarSyncGame(plString& guid);
static void JoinCommonVarSyncGame(pyKey& callbackKey);
void SetStringVar(unsigned long id, std::wstring val);

View File

@ -65,31 +65,20 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtIsVarSyncGame, args, "Params: typeID\nReturns
PyObject* textObj;
if (!PyArg_ParseTuple(args, "O", &textObj))
{
PyErr_SetString(PyExc_TypeError, "PtIsVarSyncGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsVarSyncGame expects a string");
PYTHON_RETURN_ERROR;
}
if (PyUnicode_Check(textObj))
if (PyString_CheckEx(textObj))
{
int strLen = PyUnicode_GetSize(textObj);
wchar_t* text = new wchar_t[strLen + 1];
PyUnicode_AsWideChar((PyUnicodeObject*)textObj, text, strLen);
text[strLen] = L'\0';
plString text = PyString_AsStringEx(textObj);
bool retVal = pyVarSyncGame::IsVarSyncGame(text);
delete [] text;
PYTHON_RETURN_BOOL(retVal);
}
else if (PyString_Check(textObj))
{
// we'll allow this, just in case something goes weird
char* text = PyString_AsString(textObj);
wchar_t* wText = hsStringToWString(text);
bool retVal = pyVarSyncGame::IsVarSyncGame(wText);
delete [] wText;
PYTHON_RETURN_BOOL(retVal);
}
else
{
PyErr_SetString(PyExc_TypeError, "PtIsVarSyncGame expects a unicode string");
PyErr_SetString(PyExc_TypeError, "PtIsVarSyncGame expects a string");
PYTHON_RETURN_ERROR;
}
}
@ -325,4 +314,4 @@ void pyVarSyncGame::AddPlasmaMethods(std::vector<PyMethodDef>& methods)
{
PYTHON_GLOBAL_METHOD(methods, PtIsVarSyncGame);
PYTHON_GLOBAL_METHOD(methods, PtJoinCommonVarSyncGame);
}
}

View File

@ -106,7 +106,7 @@ plUUID pyGameCli::GameTypeID() const
{
return plUUID(gameClient->GetGameTypeId());
}
return plUUID();
return kNilUuid;
}
std::wstring pyGameCli::Name() const

View File

@ -129,7 +129,8 @@ PyObject* pyGameCliMsg::UpcastToGameMsg() const
if (!message)
PYTHON_RETURN_NONE;
const Uuid& gameTypeId = message->gameCli->GetGameTypeId();
const plUUID& gameTypeId = message->gameCli->GetGameTypeId();
if (gameTypeId == kGameTypeId_TicTacToe)
return pyTTTMsg::New(message);
else if (gameTypeId == kGameTypeId_Heek)

View File

@ -111,7 +111,7 @@ plUUID pyGameMgrInviteReceivedMsg::GameTypeID() const
const Srv2Cli_GameMgr_InviteReceived* gmMsg = (const Srv2Cli_GameMgr_InviteReceived*)message->netMsg;
return plUUID(gmMsg->gameTypeId);
}
return plUUID();
return kNilUuid;
}
uint32_t pyGameMgrInviteReceivedMsg::NewGameID() const
@ -150,7 +150,7 @@ plUUID pyGameMgrInviteRevokedMsg::GameTypeID() const
const Srv2Cli_GameMgr_InviteRevoked* gmMsg = (const Srv2Cli_GameMgr_InviteRevoked*)message->netMsg;
return plUUID(gmMsg->gameTypeId);
}
return plUUID();
return kNilUuid;
}
uint32_t pyGameMgrInviteRevokedMsg::NewGameID() const

View File

@ -1689,7 +1689,7 @@ void cyMisc::SetShareSpawnPoint(const char* spawnPoint)
pMsg->Send();
}
void cyMisc::SetShareAgeInstanceGuid(const Uuid& guid)
void cyMisc::SetShareAgeInstanceGuid(const plUUID& guid)
{
plInputIfaceMgrMsg* pMsg = new plInputIfaceMgrMsg(plInputIfaceMgrMsg::kSetShareAgeInstanceGuid);
plKey k = plNetClientMgr::GetInstance()->GetLocalPlayerKey();

View File

@ -66,8 +66,8 @@ class pyPoint3;
class pyGUIDialog;
class plPipeline;
class plDisplayMode;
class plUUID;
struct PipelineParams;
struct Uuid;
typedef struct _object PyObject;
typedef struct PyMethodDef PyMethodDef;
@ -636,7 +636,7 @@ public:
static void NotifyOffererPublicLinkCompleted(uint32_t offerer);
static void ToggleAvatarClickability(bool on);
static void SetShareSpawnPoint(const char* spawnPoint);
static void SetShareAgeInstanceGuid(const Uuid& guid);
static void SetShareAgeInstanceGuid(const plUUID& guid);
//////////////////////////////////////////////////////////////////////////////
//

View File

@ -48,6 +48,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "pyGlueHelpers.h"
#include "pySceneObject.h"
#include "pnUtils/pnUtils.h"
#include "pnUUID/pnUUID.h"
PYTHON_GLOBAL_METHOD_DEFINITION(PtSendPetitionToCCR, args, "Params: message,reason=0,title=\"\"\nSends a petition with a message to the CCR group")
{
@ -437,12 +438,14 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtSetShareAgeInstanceGuid, args, "Params: instan
PyErr_SetString(PyExc_TypeError, "PtSetShareAgeInstanceGuid expects a string");
PYTHON_RETURN_ERROR;
}
Uuid guid;
if (!GuidFromString(guidStr, &guid))
plUUID guid(guidStr);
if (guid == kNilUuid)
{
PyErr_SetString(PyExc_TypeError, "PtSetShareAgeInstanceGuid string parameter is not a guid string");
PYTHON_RETURN_ERROR;
}
cyMisc::SetShareAgeInstanceGuid(guid);
PYTHON_RETURN_NONE;
}
@ -778,4 +781,4 @@ void cyMisc::AddPlasmaMethods3(std::vector<PyMethodDef> &methods)
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetUserPath);
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetInitPath);
}
}

View File

@ -193,7 +193,7 @@ plUUID pyAgeVault::GetAgeGuid( void )
rvn->DecRef();
return uuid;
}
return plUUID();
return kNilUuid;
}

View File

@ -111,5 +111,5 @@ plUUID pyDniInfoSource::GetAgeGuid( void ) const
return uuid;
}
return plUUID();
return kNilUuid;
}

View File

@ -531,7 +531,7 @@ bool pyVault::AmAgeOwner( const pyAgeInfoStruct * ageInfo )
if (!ageInfo->GetAgeInfo())
return false;
Uuid ageInstId = *ageInfo->GetAgeInfo()->GetAgeInstanceGuid();
plUUID ageInstId = *ageInfo->GetAgeInfo()->GetAgeInstanceGuid();
return VaultAmOwnerOfAge(ageInstId);
}
@ -540,7 +540,7 @@ bool pyVault::AmAgeCzar( const pyAgeInfoStruct * ageInfo )
if (!ageInfo->GetAgeInfo())
return false;
Uuid ageInstId = *ageInfo->GetAgeInfo()->GetAgeInstanceGuid();
plUUID ageInstId = *ageInfo->GetAgeInfo()->GetAgeInstanceGuid();
return VaultAmCzarOfAge(ageInstId);
}
@ -574,10 +574,8 @@ void pyVault::RegisterVisitAge( const pyAgeLinkStruct & link )
void pyVault::UnRegisterVisitAge( const char * guidstr )
{
Uuid uuid;
GuidFromString(guidstr, &uuid);
plAgeInfoStruct info;
plUUID guid(uuid);
plUUID guid(guidstr);
info.SetAgeInstanceGuid(&guid);
VaultUnregisterVisitAgeAndWait(&info);
}

View File

@ -236,7 +236,7 @@ plUUID pyVaultAgeInfoNode::GetAgeInstanceGuid() const
return plUUID(access.ageInstUuid);
}
return plUUID();
return kNilUuid;
}
void pyVaultAgeInfoNode::SetAgeInstanceGuid( const char * sguid )

View File

@ -95,15 +95,14 @@ plUUID pyVaultMarkerGameNode::GetGameGuid() const
VaultMarkerGameNode access(fNode);
return plUUID(access.gameGuid);
}
return plUUID();
return kNilUuid;
}
void pyVaultMarkerGameNode::SetGameGuid (const char v[])
{
if (fNode) {
VaultMarkerGameNode access(fNode);
Uuid uuid;
GuidFromString(v, &uuid);
plUUID uuid(v);
access.SetGameGuid(uuid);
}
}

View File

@ -328,7 +328,7 @@ plUUID pyVaultNode::GetCreateAgeGuid(void) const
return plUUID(fNode->createAgeUuid);
}
return plUUID();
return kNilUuid;
}
PyObject* pyVaultNode::GetCreateAgeCoords () {
@ -384,8 +384,7 @@ void pyVaultNode::SetCreateAgeName( const char * v )
void pyVaultNode::SetCreateAgeGuid( const char * v )
{
ASSERT(fNode);
Uuid uuid;
GuidFromString(v, &uuid);
plUUID uuid(v);
fNode->SetCreateAgeUuid(uuid);
}

View File

@ -153,10 +153,9 @@ void pyVaultPlayerInfoNode::Player_SetAgeGuid( const char * guidtext)
if (!fNode)
return;
Uuid ageInstId;
GuidFromString(guidtext, &ageInstId);
plUUID ageInstId(guidtext);
VaultPlayerInfoNode playerInfo(fNode);
playerInfo.SetAgeInstUuid(ageInstId);
playerInfo.SetAgeInstUuid(ageInstId);
}
plUUID pyVaultPlayerInfoNode::Player_GetAgeGuid(void) const
@ -165,7 +164,7 @@ plUUID pyVaultPlayerInfoNode::Player_GetAgeGuid(void) const
VaultPlayerInfoNode playerInfo(fNode);
return plUUID(playerInfo.ageInstUuid);
}
return plUUID();
return kNilUuid;
}
// online status

View File

@ -236,10 +236,8 @@ PyObject *pyVaultPlayerNode::GetVisitAgeLink(const pyAgeInfoStruct *info)
void pyVaultPlayerNode::RemoveVisitAgeLink(const char *guidstr)
{
Uuid uuid;
GuidFromString(guidstr, &uuid);
plAgeInfoStruct info;
plUUID guid(uuid);
plUUID guid(guidstr);
info.SetAgeInstanceGuid(&guid);
VaultUnregisterOwnedAgeAndWait(&info);
}