Fix account namespace and deferred housing area-trigger creation

This commit is contained in:
Gexo91
2026-10-06 23:47:31 +03:00
parent 996c64f2ae
commit 079013d7a2
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ jobs:
- name: Build Windows binaries - name: Build Windows binaries
run: | run: |
cmake --build build --parallel 2 cmake --build build --parallel 2 -- -k 20
if ($LASTEXITCODE -ne 0) { throw 'Windows build failed' } if ($LASTEXITCODE -ne 0) { throw 'Windows build failed' }
- name: Copy runtime dependencies and check binaries - name: Copy runtime dependencies and check binaries
+5 -5
View File
@@ -85,13 +85,13 @@ namespace Battlenet
void Account::ClearUpdateMask(bool remove) void Battlenet::Account::ClearUpdateMask(bool remove)
{ {
m_values.ClearChangesMask(&Account::m_housingStorageData); m_values.ClearChangesMask(&Account::m_housingStorageData);
BaseEntity::ClearUpdateMask(remove); BaseEntity::ClearUpdateMask(remove);
} }
void Account::SendUpdateToPlayer(Player* player) void Battlenet::Account::SendUpdateToPlayer(Player* player)
{ {
// BaseEntity::SendUpdateToPlayer is const and skips BuildUpdateChangesMask(), // BaseEntity::SendUpdateToPlayer is const and skips BuildUpdateChangesMask(),
// so ContentsChangedMask is 0 and the VALUES_UPDATE contains no fragment data. // so ContentsChangedMask is 0 and the VALUES_UPDATE contains no fragment data.
@@ -102,7 +102,7 @@ void Account::SendUpdateToPlayer(Player* player)
ClearUpdateMask(true); ClearUpdateMask(true);
} }
void Account::SetHousingDecorStorageEntry(ObjectGuid decorGuid, ObjectGuid houseGuid, uint8 sourceType, std::string sourceValue, std::optional<uint8> placementStatus) void Battlenet::Account::SetHousingDecorStorageEntry(ObjectGuid decorGuid, ObjectGuid houseGuid, uint8 sourceType, std::string sourceValue, std::optional<uint8> placementStatus)
{ {
auto setter = m_values.ModifyValue(&Account::m_housingStorageData).ModifyValue(&UF::HousingStorageData::Decor); auto setter = m_values.ModifyValue(&Account::m_housingStorageData).ModifyValue(&UF::HousingStorageData::Decor);
// Remove before re-inserting so identical values still mark the entry changed: the client // Remove before re-inserting so identical values still mark the entry changed: the client
@@ -124,7 +124,7 @@ void Account::SetHousingDecorStorageEntry(ObjectGuid decorGuid, ObjectGuid house
SetUpdateFieldValue(ref.ModifyValue(&UF::DecorStoragePersistedData::SourceValue), std::move(sourceValue)); SetUpdateFieldValue(ref.ModifyValue(&UF::DecorStoragePersistedData::SourceValue), std::move(sourceValue));
} }
void Account::SetHousingDecorDyeSlots(ObjectGuid decorGuid, std::array<uint32, 3> const& dyeSlots) void Battlenet::Account::SetHousingDecorDyeSlots(ObjectGuid decorGuid, std::array<uint32, 3> const& dyeSlots)
{ {
auto ref = m_values.ModifyValue(&Account::m_housingStorageData).ModifyValue(&UF::HousingStorageData::Decor, decorGuid); auto ref = m_values.ModifyValue(&Account::m_housingStorageData).ModifyValue(&UF::HousingStorageData::Decor, decorGuid);
if (std::ranges::any_of(dyeSlots, [](uint32 dye) { return dye != 0; })) if (std::ranges::any_of(dyeSlots, [](uint32 dye) { return dye != 0; }))
@@ -134,7 +134,7 @@ void Account::SetHousingDecorDyeSlots(ObjectGuid decorGuid, std::array<uint32, 3
RemoveOptionalUpdateFieldValue(ref.ModifyValue(&UF::DecorStoragePersistedData::DyeSlots)); RemoveOptionalUpdateFieldValue(ref.ModifyValue(&UF::DecorStoragePersistedData::DyeSlots));
} }
void Account::RemoveHousingDecorStorageEntry(ObjectGuid decorGuid) void Battlenet::Account::RemoveHousingDecorStorageEntry(ObjectGuid decorGuid)
{ {
auto setter = m_values.ModifyValue(&Account::m_housingStorageData).ModifyValue(&UF::HousingStorageData::Decor); auto setter = m_values.ModifyValue(&Account::m_housingStorageData).ModifyValue(&UF::HousingStorageData::Decor);
RemoveMapUpdateFieldValue(setter, decorGuid); RemoveMapUpdateFieldValue(setter, decorGuid);
@@ -139,7 +139,7 @@ void AreaTrigger::PlaySpellVisual(uint32 spellVisualId) const
SendMessageToSet(packet.Write(), false); SendMessageToSet(packet.Write(), false);
} }
bool AreaTrigger::Create(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Map* map, Position const& pos, int32 duration, AreaTriggerSpawn const* spawnData /*= nullptr*/, Unit* caster /*= nullptr*/, Unit* target /*= nullptr*/, SpellCastVisual spellVisual /*= { 0, 0 }*/, SpellInfo const* spellInfo /*= nullptr*/, Spell* spell /*= nullptr*/, AuraEffect const* aurEff /*= nullptr*/) bool AreaTrigger::Create(AreaTriggerCreatePropertiesId areaTriggerCreatePropertiesId, Map* map, Position const& pos, int32 duration, AreaTriggerSpawn const* spawnData /*= nullptr*/, Unit* caster /*= nullptr*/, Unit* target /*= nullptr*/, SpellCastVisual spellVisual /*= { 0, 0 }*/, SpellInfo const* spellInfo /*= nullptr*/, Spell* spell /*= nullptr*/, AuraEffect const* aurEff /*= nullptr*/, bool addToMap /*= true*/)
{ {
_targetGuid = target ? target->GetGUID() : ObjectGuid::Empty; _targetGuid = target ? target->GetGUID() : ObjectGuid::Empty;
_aurEff = aurEff; _aurEff = aurEff;
@@ -324,7 +324,7 @@ bool AreaTrigger::Create(AreaTriggerCreatePropertiesId areaTriggerCreateProperti
UpdateShape(); UpdateShape();
if (!IsStaticSpawn()) if (!IsStaticSpawn() && addToMap)
{ {
if (!GetMap()->AddToMap(this)) if (!GetMap()->AddToMap(this))
{ {