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:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ plUUID pyGameCli::GameTypeID() const
|
||||
{
|
||||
return plUUID(gameClient->GetGameTypeId());
|
||||
}
|
||||
return plUUID();
|
||||
return kNilUuid;
|
||||
}
|
||||
|
||||
std::wstring pyGameCli::Name() const
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ plUUID pyAgeVault::GetAgeGuid( void )
|
||||
rvn->DecRef();
|
||||
return uuid;
|
||||
}
|
||||
return plUUID();
|
||||
return kNilUuid;
|
||||
}
|
||||
|
||||
|
||||
|
@ -111,5 +111,5 @@ plUUID pyDniInfoSource::GetAgeGuid( void ) const
|
||||
return uuid;
|
||||
}
|
||||
|
||||
return plUUID();
|
||||
return kNilUuid;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ plUUID pyVaultAgeInfoNode::GetAgeInstanceGuid() const
|
||||
|
||||
return plUUID(access.ageInstUuid);
|
||||
}
|
||||
return plUUID();
|
||||
return kNilUuid;
|
||||
}
|
||||
|
||||
void pyVaultAgeInfoNode::SetAgeInstanceGuid( const char * sguid )
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user