Fix account namespace and deferred housing area-trigger creation
This commit is contained in:
@@ -69,7 +69,7 @@ jobs:
|
||||
|
||||
- name: Build Windows binaries
|
||||
run: |
|
||||
cmake --build build --parallel 2
|
||||
cmake --build build --parallel 2 -- -k 20
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Windows build failed' }
|
||||
|
||||
- name: Copy runtime dependencies and check binaries
|
||||
|
||||
@@ -85,13 +85,13 @@ namespace Battlenet
|
||||
|
||||
|
||||
|
||||
void Account::ClearUpdateMask(bool remove)
|
||||
void Battlenet::Account::ClearUpdateMask(bool remove)
|
||||
{
|
||||
m_values.ClearChangesMask(&Account::m_housingStorageData);
|
||||
BaseEntity::ClearUpdateMask(remove);
|
||||
}
|
||||
|
||||
void Account::SendUpdateToPlayer(Player* player)
|
||||
void Battlenet::Account::SendUpdateToPlayer(Player* player)
|
||||
{
|
||||
// BaseEntity::SendUpdateToPlayer is const and skips BuildUpdateChangesMask(),
|
||||
// so ContentsChangedMask is 0 and the VALUES_UPDATE contains no fragment data.
|
||||
@@ -102,7 +102,7 @@ void Account::SendUpdateToPlayer(Player* player)
|
||||
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);
|
||||
// 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));
|
||||
}
|
||||
|
||||
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);
|
||||
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));
|
||||
}
|
||||
|
||||
void Account::RemoveHousingDecorStorageEntry(ObjectGuid decorGuid)
|
||||
void Battlenet::Account::RemoveHousingDecorStorageEntry(ObjectGuid decorGuid)
|
||||
{
|
||||
auto setter = m_values.ModifyValue(&Account::m_housingStorageData).ModifyValue(&UF::HousingStorageData::Decor);
|
||||
RemoveMapUpdateFieldValue(setter, decorGuid);
|
||||
|
||||
@@ -139,7 +139,7 @@ void AreaTrigger::PlaySpellVisual(uint32 spellVisualId) const
|
||||
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;
|
||||
_aurEff = aurEff;
|
||||
@@ -324,7 +324,7 @@ bool AreaTrigger::Create(AreaTriggerCreatePropertiesId areaTriggerCreateProperti
|
||||
|
||||
UpdateShape();
|
||||
|
||||
if (!IsStaticSpawn())
|
||||
if (!IsStaticSpawn() && addToMap)
|
||||
{
|
||||
if (!GetMap()->AddToMap(this))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user