mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Objects: Move AaBox out of generated UpdateFields.h file (it was manually added there)
This commit is contained in:
@@ -8478,24 +8478,6 @@ void ConversationData::ClearChangesMask()
|
||||
_changesMask.ResetAll();
|
||||
}
|
||||
|
||||
void AaBox::WriteCreate(ByteBuffer& data, BaseEntity const* owner, Player const* receiver) const
|
||||
{
|
||||
data << Low;
|
||||
data << High;
|
||||
}
|
||||
|
||||
void AaBox::WriteUpdate(ByteBuffer& data, bool ignoreChangesMask, BaseEntity const* owner, Player const* receiver) const
|
||||
{
|
||||
data << Low;
|
||||
data << High;
|
||||
}
|
||||
|
||||
bool AaBox::operator==(AaBox const& right) const
|
||||
{
|
||||
return Low == right.Low
|
||||
&& High == right.High;
|
||||
}
|
||||
|
||||
void MeshObjectData::WriteCreate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, Object const* owner, Player const* receiver) const
|
||||
{
|
||||
data.WriteBit(IsWMO);
|
||||
@@ -8504,7 +8486,7 @@ void MeshObjectData::WriteCreate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fie
|
||||
data << int32(FileDataID);
|
||||
if (Geobox.has_value())
|
||||
{
|
||||
Geobox->WriteCreate(data, owner, receiver);
|
||||
data << *Geobox;
|
||||
}
|
||||
data.FlushBits();
|
||||
data.FlushBits();
|
||||
@@ -8542,7 +8524,7 @@ void MeshObjectData::WriteUpdate(ByteBuffer& data, Mask const& changesMask, bool
|
||||
{
|
||||
if (Geobox.has_value())
|
||||
{
|
||||
Geobox->WriteUpdate(data, ignoreNestedChangesMask, owner, receiver);
|
||||
data << *Geobox;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8948,7 +8930,7 @@ void HousingPlayerHouseData::WriteCreate(ByteBuffer& data, EnumFlag<UpdateFieldF
|
||||
data << *BnetAccount;
|
||||
data << int32(PlotIndex);
|
||||
data << uint32(Level);
|
||||
data << uint64(Field_20);
|
||||
data << uint64(Favor);
|
||||
data << uint32(InteriorDecorPlacementBudget);
|
||||
data << uint32(ExteriorDecorPlacementBudget);
|
||||
data << uint32(ExteriorFixtureBudget);
|
||||
@@ -8982,7 +8964,7 @@ void HousingPlayerHouseData::WriteUpdate(ByteBuffer& data, Mask const& changesMa
|
||||
}
|
||||
if (changesMask[4])
|
||||
{
|
||||
data << uint64(Field_20);
|
||||
data << uint64(Favor);
|
||||
}
|
||||
if (changesMask[5])
|
||||
{
|
||||
@@ -9012,7 +8994,7 @@ void HousingPlayerHouseData::ClearChangesMask()
|
||||
Base::ClearChangesMask(BnetAccount);
|
||||
Base::ClearChangesMask(PlotIndex);
|
||||
Base::ClearChangesMask(Level);
|
||||
Base::ClearChangesMask(Field_20);
|
||||
Base::ClearChangesMask(Favor);
|
||||
Base::ClearChangesMask(InteriorDecorPlacementBudget);
|
||||
Base::ClearChangesMask(ExteriorDecorPlacementBudget);
|
||||
Base::ClearChangesMask(ExteriorFixtureBudget);
|
||||
@@ -9059,7 +9041,7 @@ void HousingCornerstoneData::ClearChangesMask()
|
||||
|
||||
void HousingPlotAreaTriggerData::WriteCreate(ByteBuffer& data, EnumFlag<UpdateFieldFlag> fieldVisibilityFlags, AreaTrigger const* owner, Player const* receiver) const
|
||||
{
|
||||
data << uint32(Field_0);
|
||||
data << uint32(PlotID);
|
||||
data << *HouseOwnerGUID;
|
||||
data << *HouseGUID;
|
||||
data << *HouseOwnerBnetAccountGUID;
|
||||
@@ -9079,7 +9061,7 @@ void HousingPlotAreaTriggerData::WriteUpdate(ByteBuffer& data, Mask const& chang
|
||||
{
|
||||
if (changesMask[1])
|
||||
{
|
||||
data << uint32(Field_0);
|
||||
data << uint32(PlotID);
|
||||
}
|
||||
if (changesMask[2])
|
||||
{
|
||||
@@ -9098,7 +9080,7 @@ void HousingPlotAreaTriggerData::WriteUpdate(ByteBuffer& data, Mask const& chang
|
||||
|
||||
void HousingPlotAreaTriggerData::ClearChangesMask()
|
||||
{
|
||||
Base::ClearChangesMask(Field_0);
|
||||
Base::ClearChangesMask(PlotID);
|
||||
Base::ClearChangesMask(HouseOwnerGUID);
|
||||
Base::ClearChangesMask(HouseGUID);
|
||||
Base::ClearChangesMask(HouseOwnerBnetAccountGUID);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "Position.h"
|
||||
#include "QuaternionData.h"
|
||||
#include "UpdateField.h"
|
||||
#include "UpdateFieldsAaBox.h"
|
||||
#include "UpdateMask.h"
|
||||
|
||||
// This file is automatically generated, DO NOT EDIT
|
||||
@@ -1606,17 +1607,6 @@ struct ConversationData : public IsUpdateFieldStructureTag, public HasChangesMas
|
||||
void ClearChangesMask();
|
||||
};
|
||||
|
||||
struct AaBox : public IsUpdateFieldStructureTag
|
||||
{
|
||||
TaggedPosition<Position::XYZ> Low;
|
||||
TaggedPosition<Position::XYZ> High;
|
||||
|
||||
void WriteCreate(ByteBuffer& data, BaseEntity const* owner, Player const* receiver) const;
|
||||
void WriteUpdate(ByteBuffer& data, bool ignoreChangesMask, BaseEntity const* owner, Player const* receiver) const;
|
||||
bool operator==(AaBox const& right) const;
|
||||
bool operator!=(AaBox const& right) const { return !(*this == right); }
|
||||
};
|
||||
|
||||
struct MeshObjectData : public IsUpdateFieldStructureTag, public HasChangesMask<5>
|
||||
{
|
||||
UpdateField<bool, 0, 1> IsWMO;
|
||||
@@ -1725,7 +1715,7 @@ struct HousingPlayerHouseData : public IsUpdateFieldStructureTag, public HasChan
|
||||
UpdateField<ObjectGuid, 0, 1> BnetAccount;
|
||||
UpdateField<int32, 0, 2> PlotIndex;
|
||||
UpdateField<uint32, 0, 3> Level;
|
||||
UpdateField<uint64, 0, 4> Field_20;
|
||||
UpdateField<uint64, 0, 4> Favor;
|
||||
UpdateField<uint32, 0, 5> InteriorDecorPlacementBudget;
|
||||
UpdateField<uint32, 0, 6> ExteriorDecorPlacementBudget;
|
||||
UpdateField<uint32, 0, 7> ExteriorFixtureBudget;
|
||||
@@ -1751,7 +1741,7 @@ struct HousingCornerstoneData : public IsUpdateFieldStructureTag, public HasChan
|
||||
|
||||
struct HousingPlotAreaTriggerData : public IsUpdateFieldStructureTag, public HasChangesMask<5>
|
||||
{
|
||||
UpdateField<uint32, 0, 1> Field_0;
|
||||
UpdateField<uint32, 0, 1> PlotID; // PlotIndex, not id from NeighborhoodPlot.db2
|
||||
UpdateField<ObjectGuid, 0, 2> HouseOwnerGUID;
|
||||
UpdateField<ObjectGuid, 0, 3> HouseGUID;
|
||||
UpdateField<ObjectGuid, 0, 4> HouseOwnerBnetAccountGUID;
|
||||
|
||||
41
src/server/game/Entities/Object/Updates/UpdateFieldsAaBox.h
Normal file
41
src/server/game/Entities/Object/Updates/UpdateFieldsAaBox.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TRINITYCORE_UPDATE_FIELDS_AA_BOX_H
|
||||
#define TRINITYCORE_UPDATE_FIELDS_AA_BOX_H
|
||||
|
||||
#include "Position.h"
|
||||
|
||||
namespace UF
|
||||
{
|
||||
struct AaBox
|
||||
{
|
||||
TaggedPosition<Position::XYZ> Low;
|
||||
TaggedPosition<Position::XYZ> High;
|
||||
|
||||
friend bool operator==(AaBox const&, AaBox const&) noexcept = default;
|
||||
|
||||
friend ByteBuffer& operator<<(ByteBuffer& data, AaBox const& box)
|
||||
{
|
||||
data << box.Low;
|
||||
data << box.High;
|
||||
return data;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif // TRINITYCORE_UPDATE_FIELDS_AA_BOX_H
|
||||
Reference in New Issue
Block a user