Showing the changes to interface/src/scripting/WalletScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -17,14 +17,6 @@ CheckoutProxy::CheckoutProxy(QObject* qmlObject, QObject* parent) : QmlWrapper(q · 16 unmodified lines | |||
| 17 | 17 | ||
| 18 | WalletScriptingInterface::WalletScriptingInterface() { | 18 | WalletScriptingInterface::WalletScriptingInterface() { |
| 19 | 19 | ||
| 20 | _entityPropertyFlags += PROP_POSITION; | ||
| 21 | _entityPropertyFlags += PROP_ROTATION; | ||
| 22 | _entityPropertyFlags += PROP_MARKETPLACE_ID; | ||
| 23 | _entityPropertyFlags += PROP_DIMENSIONS; | ||
| 24 | _entityPropertyFlags += PROP_REGISTRATION_POINT; | ||
| 25 | _entityPropertyFlags += PROP_CERTIFICATE_ID; | ||
| 26 | _entityPropertyFlags += PROP_CLIENT_ONLY; | ||
| 27 | _entityPropertyFlags += PROP_OWNING_AVATAR_ID; | ||
| 28 | } | 20 | } |
| 29 | 21 | ||
| 30 | void WalletScriptingInterface::refreshWalletStatus() { | 22 | void WalletScriptingInterface::refreshWalletStatus() { |
| @@ -37,11 +29,17 @@ void WalletScriptingInterface::setWalletStatus(const uint& status) { · 6 unmodified lines | |||
| 37 | emit DependencyManager::get<Wallet>()->walletStatusResult(status); | 29 | emit DependencyManager::get<Wallet>()->walletStatusResult(status); |
| 38 | } | 30 | } |
| 39 | 31 | ||
| 40 | void WalletScriptingInterface::proveEntityOwnershipVerification(const QUuid& entityID) { | 32 | void WalletScriptingInterface::proveAvatarEntityOwnershipVerification(const QUuid& entityID) { |
| 41 | EntityItemProperties entityProperties = DependencyManager::get<EntityScriptingInterface>()->getEntityProperties(entityID, _entityPropertyFlags); | 33 | QSharedPointer<ContextOverlayInterface> contextOverlayInterface = DependencyManager::get<ContextOverlayInterface>(); |
| 42 | if (!entityID.isNull() && entityProperties.getMarketplaceID().length() > 0) { | 34 | EntityItemProperties entityProperties = DependencyManager::get<EntityScriptingInterface>()->getEntityProperties(entityID, |
| 43 | DependencyManager::get<ContextOverlayInterface>()->requestOwnershipVerification(entityID); | 35 | contextOverlayInterface->getEntityPropertyFlags()); |
| 36 | if (entityProperties.getClientOnly()) { | ||
| 37 | if (!entityID.isNull() && entityProperties.getCertificateID().length() > 0) { | ||
| 38 | contextOverlayInterface->requestOwnershipVerification(entityID); | ||
| 39 | } else { | ||
| 40 | qCDebug(entities) << "Failed to prove ownership of:" << entityID << "is null or not a certified item"; | ||
| 41 | } | ||
| 44 | } else { | 42 | } else { |
| 45 | qCDebug(entities) << "Failed to prove ownership of:" << entityID << "is null or not a marketplace item"; | 43 | qCDebug(entities) << "Failed to prove ownership of:" << entityID << "is not an avatar entity"; |
| 46 | } | 44 | } |
| 47 | } | 45 | } |