diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-08-27 12:49:33 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-08-27 12:49:33 +0200 |
commit | b8912d2ac81492ccbb0c081f12dc07095ccb1d39 (patch) | |
tree | f93a15d64007dd8a726d407b9e20e6d94c6beb9e /src | |
parent | 43584b4d1df65a7d7ff9f3a8db66e61855f747bf (diff) |
Build fix for clang 11-13
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Server/Packets/ItemPacketsCommon.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/src/server/game/Server/Packets/ItemPacketsCommon.cpp b/src/server/game/Server/Packets/ItemPacketsCommon.cpp index 0843a4091e8..5078787c245 100644 --- a/src/server/game/Server/Packets/ItemPacketsCommon.cpp +++ b/src/server/game/Server/Packets/ItemPacketsCommon.cpp @@ -33,7 +33,10 @@ bool ItemBonuses::operator==(ItemBonuses const& r) const return std::is_permutation(BonusListIDs.begin(), BonusListIDs.end(), r.BonusListIDs.begin()); } -bool ItemMod::operator==(ItemMod const& r) const = default; +bool ItemMod::operator==(ItemMod const& r) const +{ + return Value == r.Value && Type == r.Type; +} bool ItemModList::operator==(ItemModList const& r) const { @@ -104,9 +107,33 @@ void ItemInstance::Initialize(::VoidStorageItem const* voidItem) } } -bool ItemInstance::operator==(ItemInstance const& r) const = default; +bool ItemInstance::operator==(ItemInstance const& r) const +{ + if (ItemID != r.ItemID) + return false; + + if (ItemBonus != r.ItemBonus) + return false; + + if (Modifications != r.Modifications) + return false; + + return true; +} + +bool ItemBonusKey::operator==(ItemBonusKey const& right) const +{ + if (ItemID != right.ItemID) + return false; -bool ItemBonusKey::operator==(ItemBonusKey const& right) const = default; + if (BonusListIDs != right.BonusListIDs) + return false; + + if (Modifications != right.Modifications) + return false; + + return true; +} ByteBuffer& operator<<(ByteBuffer& data, ItemBonuses const& itemBonusInstanceData) { |