mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-23 14:33:07 +00:00
feat(property): zone position and build height come from PropertyTemplate
DownloadPropertyData sent the same zonePosition (548, 406, 178) and a maxBuildHeight of 128 for every property. Both now come from the property's PropertyTemplate row (zoneX/zoneY/zoneZ, maxBuildHeight), the same row the template ID, vendor map and spawn name already come from. A map with no row still sends the old values. Live rows: Avant Gardens small (1150) keeps 548/406/178 and 128; Avant Gardens medium (1151) is 428/413/82 with a build height of 256; the Nimbus Station (1250, 1251), Gnarled Forest (1350) and Forbidden Valley (1450) properties get their own positions with 128. Check in game: on the medium Avant Gardens property (1151) models can be placed higher than before (up to 256), and on the small one (1150) the limit is unchanged; on the other worlds' properties the property screens (plaque, news/claim UI) still show and building works as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,11 @@ void CDPropertyTemplateTable::LoadValuesFromDatabase() {
|
|||||||
static_cast<uint32_t>(tableData.getIntField("id", -1)),
|
static_cast<uint32_t>(tableData.getIntField("id", -1)),
|
||||||
static_cast<uint32_t>(tableData.getIntField("mapID", -1)),
|
static_cast<uint32_t>(tableData.getIntField("mapID", -1)),
|
||||||
static_cast<uint32_t>(tableData.getIntField("vendorMapID", -1)),
|
static_cast<uint32_t>(tableData.getIntField("vendorMapID", -1)),
|
||||||
tableData.getStringField("spawnName", "")
|
tableData.getStringField("spawnName", ""),
|
||||||
|
tableData.getFloatField("zoneX", 548.0f),
|
||||||
|
tableData.getFloatField("zoneY", 406.0f),
|
||||||
|
tableData.getFloatField("zoneZ", 178.0f),
|
||||||
|
tableData.getFloatField("maxBuildHeight", 128.0f)
|
||||||
};
|
};
|
||||||
|
|
||||||
entries.push_back(entry);
|
entries.push_back(entry);
|
||||||
|
|||||||
@@ -6,6 +6,12 @@ struct CDPropertyTemplate {
|
|||||||
uint32_t mapID;
|
uint32_t mapID;
|
||||||
uint32_t vendorMapID;
|
uint32_t vendorMapID;
|
||||||
std::string spawnName;
|
std::string spawnName;
|
||||||
|
// Sent to the client in DownloadPropertyData; the defaults are what was sent
|
||||||
|
// for every property before these columns were read
|
||||||
|
float zoneX = 548.0f;
|
||||||
|
float zoneY = 406.0f;
|
||||||
|
float zoneZ = 178.0f;
|
||||||
|
float maxBuildHeight = 128.0f;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CDPropertyTemplateTable : public CDTable<CDPropertyTemplateTable, std::vector<CDPropertyTemplate>> {
|
class CDPropertyTemplateTable : public CDTable<CDPropertyTemplateTable, std::vector<CDPropertyTemplate>> {
|
||||||
|
|||||||
@@ -946,8 +946,8 @@ void PropertyManagementComponent::OnQueryPropertyData(Entity* originator, const
|
|||||||
message.lastLogoutTime = 0;
|
message.lastLogoutTime = 0;
|
||||||
message.dayOfMonthPlaqueWasBought = 1;
|
message.dayOfMonthPlaqueWasBought = 1;
|
||||||
message.repAchievementReq = 1;
|
message.repAchievementReq = 1;
|
||||||
message.zonePosition = { 548.0f, 406.0f, 178.0f };
|
message.zonePosition = { propertyTemplate.zoneX, propertyTemplate.zoneY, propertyTemplate.zoneZ };
|
||||||
message.maxBuildHeight = 128.0f;
|
message.maxBuildHeight = propertyTemplate.maxBuildHeight;
|
||||||
message.rentalDate = claimed;
|
message.rentalDate = claimed;
|
||||||
message.accessType = static_cast<uint8_t>(privacy);
|
message.accessType = static_cast<uint8_t>(privacy);
|
||||||
message.pathPositions = GetPaths();
|
message.pathPositions = GetPaths();
|
||||||
|
|||||||
Reference in New Issue
Block a user