General updates to the property manager

clone id is correctly assigned, reputation now shows up, rejection verdict is sent correctly (not sure about where the reason goes if  it even goes here).
This commit is contained in:
EmosewaMC
2022-03-29 23:49:04 -07:00
parent 36edbf393b
commit e244fbccc2
4 changed files with 54 additions and 7 deletions

View File

@@ -68,10 +68,15 @@ PropertyManagementComponent::PropertyManagementComponent(Entity* parent) : Compo
this->owner = propertyEntry->getUInt64(2);
this->owner = GeneralUtils::SetBit(this->owner, OBJECT_BIT_CHARACTER);
this->owner = GeneralUtils::SetBit(this->owner, OBJECT_BIT_PERSISTENT);
this->clone_Id = propertyEntry->getInt(2);
this->propertyName = propertyEntry->getString(5).c_str();
this->propertyDescription = propertyEntry->getString(6).c_str();
this->privacyOption = static_cast<PropertyPrivacyOption>(propertyEntry->getUInt(9));
this->moderatorRequested = propertyEntry->getInt(10) == 0 && rejectionReason == "" && privacyOption == PropertyPrivacyOption::Public;
this->LastUpdatedTime = propertyEntry->getUInt64(11);
this->claimedTime = propertyEntry->getUInt64(12);
this->rejectionReason = propertyEntry->getString(13);
this->reputation = propertyEntry->getUInt(14);
Load();
}
@@ -822,17 +827,21 @@ void PropertyManagementComponent::OnQueryPropertyData(Entity* originator, const
claimed = claimedTime;
privacy = static_cast<char>(this->privacyOption);
}
message.moderatorRequested = moderatorRequested;
message.reputation = reputation;
message.LastUpdatedTime = LastUpdatedTime;
message.OwnerId = ownerId;
message.OwnerName = ownerName;
message.Name = name;
message.Description = description;
message.ClaimedTime = claimed;
message.PrivacyOption = privacy;
message.cloneId = clone_Id;
message.rejectionReason = rejectionReason;
message.Paths = GetPaths();
SendDownloadPropertyData(author, message, UNASSIGNED_SYSTEM_ADDRESS);
// send rejction here?
}
void PropertyManagementComponent::OnUse(Entity* originator)

View File

@@ -194,11 +194,36 @@ private:
*/
std::string propertyName = "";
/**
* The clone ID of this property
*/
LWOCLONEID clone_Id = 0;
/**
* Whether a moderator was requested
*/
bool moderatorRequested = false;
/**
* The rejection reason for the property
*/
std::string rejectionReason = "";
/**
* The description of this property
*/
std::string propertyDescription = "";
/**
* The reputation of this property
*/
uint32_t reputation = 0;
/**
* The last time this property was updated
*/
uint32_t LastUpdatedTime = 0;
/**
* Determines which players may visit this property
*/