mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-13 18:17:49 -04:00
Clone unloading
This commit is contained in:
@ -2903,21 +2903,19 @@ void cyMisc::VaultDownload(unsigned nodeId)
|
||||
);
|
||||
}
|
||||
|
||||
PyObject* cyMisc::CloneKey(pyKey* object, bool netForce) {
|
||||
PyObject* cyMisc::CloneKey(pyKey* object, bool loading) {
|
||||
|
||||
plKey obj = object->getKey();
|
||||
plUoid uoid = obj->GetUoid();
|
||||
|
||||
plLoadCloneMsg* cloneMsg;
|
||||
if (uoid.IsClone())
|
||||
cloneMsg = new plLoadCloneMsg(obj, plNetClientMgr::GetInstance()->GetKey(), 0, true);
|
||||
cloneMsg = new plLoadCloneMsg(obj, plNetClientMgr::GetInstance()->GetKey(), 0, loading);
|
||||
else
|
||||
cloneMsg = new plLoadCloneMsg(uoid, plNetClientMgr::GetInstance()->GetKey(), 0);
|
||||
|
||||
if (netForce) {
|
||||
cloneMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
cloneMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
}
|
||||
|
||||
cloneMsg->SetBCastFlag(plMessage::kNetPropagate);
|
||||
cloneMsg->SetBCastFlag(plMessage::kNetForce);
|
||||
cloneMsg->Send();
|
||||
|
||||
return pyKey::New(cloneMsg->GetCloneKey());
|
||||
|
@ -484,17 +484,17 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtDumpLogs, args, "Params: folder\nDumps all cur
|
||||
}
|
||||
}
|
||||
|
||||
PYTHON_GLOBAL_METHOD_DEFINITION(PtCloneKey, args, "Params: key, netForce=false\nCreates clone of key")
|
||||
PYTHON_GLOBAL_METHOD_DEFINITION(PtCloneKey, args, "Params: key, loading=false\nCreates clone of key")
|
||||
{
|
||||
PyObject* keyObj = NULL;
|
||||
char netForce = 0;
|
||||
if (!PyArg_ParseTuple(args, "O|b", &keyObj, &netForce) || !pyKey::Check(keyObj))
|
||||
char loading = 0;
|
||||
if (!PyArg_ParseTuple(args, "O|b", &keyObj, &loading) || !pyKey::Check(keyObj))
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError, "PtCloneKey expects a ptKey and bool");
|
||||
PYTHON_RETURN_ERROR;
|
||||
}
|
||||
pyKey* key = pyKey::ConvertFrom(keyObj);
|
||||
return cyMisc::CloneKey(key, netForce);
|
||||
return cyMisc::CloneKey(key, loading);
|
||||
}
|
||||
|
||||
PYTHON_GLOBAL_METHOD_DEFINITION(PtFindClones, args, "Params: key\nFinds all clones")
|
||||
|
Reference in New Issue
Block a user