mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 14:03:34 +00:00
Semantics
This commit is contained in:
parent
061d2b394c
commit
002025231e
@ -1,13 +1,15 @@
|
|||||||
#include <CDPropertyEntranceComponentTable.h>
|
#include "PropertyEntranceComponent.h"
|
||||||
#include "PropertyEntranceComponent.h"
|
|
||||||
|
#include <CDPropertyEntranceComponentTable.h>
|
||||||
|
|
||||||
|
#include "Character.h"
|
||||||
|
#include "Database.h"
|
||||||
|
#include "GameMessages.h"
|
||||||
|
#include "PropertyManagementComponent.h"
|
||||||
#include "PropertySelectQueryProperty.h"
|
#include "PropertySelectQueryProperty.h"
|
||||||
#include "RocketLaunchpadControlComponent.h"
|
#include "RocketLaunchpadControlComponent.h"
|
||||||
#include "Character.h"
|
|
||||||
#include "GameMessages.h"
|
|
||||||
#include "dLogger.h"
|
|
||||||
#include "Database.h"
|
|
||||||
#include "PropertyManagementComponent.h"
|
|
||||||
#include "UserManager.h"
|
#include "UserManager.h"
|
||||||
|
#include "dLogger.h"
|
||||||
|
|
||||||
PropertyEntranceComponent::PropertyEntranceComponent(uint32_t componentID, Entity* parent) : Component(parent)
|
PropertyEntranceComponent::PropertyEntranceComponent(uint32_t componentID, Entity* parent) : Component(parent)
|
||||||
{
|
{
|
||||||
@ -201,24 +203,21 @@ void PropertyEntranceComponent::OnPropertyEntranceSync(Entity* entity, bool incl
|
|||||||
propertyLookup->setInt(7, numResults);
|
propertyLookup->setInt(7, numResults);
|
||||||
propertyLookup->setInt(8, startIndex);
|
propertyLookup->setInt(8, startIndex);
|
||||||
|
|
||||||
Game::logger->Log("PropertyEntranceComponent", "Property query is \n%s\n. Entity is %s.\n", query.c_str(), entity->GetGMLevel() >= GAME_MASTER_LEVEL_LEAD_MODERATOR ? "a moderator" : "not a moderator");
|
|
||||||
|
|
||||||
auto propertyEntry = propertyLookup->executeQuery();
|
auto propertyEntry = propertyLookup->executeQuery();
|
||||||
|
|
||||||
while (propertyEntry->next())
|
while (propertyEntry->next()) {
|
||||||
{
|
const auto propertyId = propertyEntry->getUInt64(1);
|
||||||
const auto propertyId = propertyEntry->getUInt64(1);
|
const auto owner = propertyEntry->getInt(2);
|
||||||
const auto owner = propertyEntry->getInt(2);
|
|
||||||
const auto cloneId = propertyEntry->getUInt64(4);
|
const auto cloneId = propertyEntry->getUInt64(4);
|
||||||
const auto name = propertyEntry->getString(5).asStdString();
|
const auto name = propertyEntry->getString(5).asStdString();
|
||||||
const auto description = propertyEntry->getString(6).asStdString();
|
const auto description = propertyEntry->getString(6).asStdString();
|
||||||
const auto privacyOption = propertyEntry->getInt(9);
|
const auto privacyOption = propertyEntry->getInt(9);
|
||||||
const auto modApproved = propertyEntry->getBoolean(10);
|
const auto modApproved = propertyEntry->getBoolean(10);
|
||||||
const auto dateLastUpdated = propertyEntry->getInt(11);
|
const auto dateLastUpdated = propertyEntry->getInt(11);
|
||||||
const float reputation = propertyEntry->getInt(14);
|
const float reputation = propertyEntry->getInt(14);
|
||||||
const auto performanceCost = (float)propertyEntry->getDouble(16);
|
const auto performanceCost = (float)propertyEntry->getDouble(16);
|
||||||
|
|
||||||
PropertySelectQueryProperty entry {};
|
PropertySelectQueryProperty entry{};
|
||||||
|
|
||||||
std::string ownerName = "";
|
std::string ownerName = "";
|
||||||
bool isOwned = true;
|
bool isOwned = true;
|
||||||
@ -235,8 +234,7 @@ void PropertyEntranceComponent::OnPropertyEntranceSync(Entity* entity, bool incl
|
|||||||
Game::logger->Log("PropertyEntranceComponent", "Failed to find property owner name for %llu!\n", cloneId);
|
Game::logger->Log("PropertyEntranceComponent", "Failed to find property owner name for %llu!\n", cloneId);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
isOwned = cloneId == character->GetPropertyCloneID();
|
isOwned = cloneId == character->GetPropertyCloneID();
|
||||||
ownerName = nameResult->getString(1).asStdString();
|
ownerName = nameResult->getString(1).asStdString();
|
||||||
}
|
}
|
||||||
@ -244,7 +242,7 @@ void PropertyEntranceComponent::OnPropertyEntranceSync(Entity* entity, bool incl
|
|||||||
delete nameResult;
|
delete nameResult;
|
||||||
nameResult = nullptr;
|
nameResult = nullptr;
|
||||||
|
|
||||||
delete nameLookup;
|
delete nameLookup;
|
||||||
nameLookup = nullptr;
|
nameLookup = nullptr;
|
||||||
|
|
||||||
std::string propertyName = "";
|
std::string propertyName = "";
|
||||||
@ -314,7 +312,7 @@ void PropertyEntranceComponent::OnPropertyEntranceSync(Entity* entity, bool incl
|
|||||||
entry = SetPropertyValues(entry, cloneId, ownerName, propertyName, propertyDescription, reputation, isBestFriend, isFriend, isModeratorApproved, isAlt, isOwned, privacyOption, dateLastUpdated, performanceCost);
|
entry = SetPropertyValues(entry, cloneId, ownerName, propertyName, propertyDescription, reputation, isBestFriend, isFriend, isModeratorApproved, isAlt, isOwned, privacyOption, dateLastUpdated, performanceCost);
|
||||||
|
|
||||||
entries.push_back(entry);
|
entries.push_back(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete propertyEntry;
|
delete propertyEntry;
|
||||||
propertyEntry = nullptr;
|
propertyEntry = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user