diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-01-16 00:24:55 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-01-16 00:24:55 +0100 |
commit | 49bc69a27e7155bea7aad501c116c9fc8f9f3e78 (patch) | |
tree | 3279c6659f25c877ec438ac2ed03fef9817506da /src/server/game/Globals/ObjectMgr.h | |
parent | e761a006721d85609c3243fc88216ae7908e4d34 (diff) |
Core/Misc: Remove unneccessary structure packing and one unused enum
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.h')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 416133c8430..78f917710d2 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -71,22 +71,14 @@ enum SummonerType SUMMONER_TYPE_MAP = 2 }; -#pragma pack(push, 1) - /// Key for storing temp summon data in TempSummonDataContainer struct TempSummonGroupKey { - TempSummonGroupKey(uint32 summonerEntry, SummonerType summonerType, uint8 group) - : _summonerEntry(summonerEntry), _summonerType(summonerType), _summonGroup(group) - { - } - std::strong_ordering operator<=>(TempSummonGroupKey const& right) const = default; -private: - uint32 _summonerEntry; ///< Summoner's entry - SummonerType _summonerType; ///< Summoner's type, see SummonerType for available types - uint8 _summonGroup; ///< Summon's group id + uint32 SummonerEntry; ///< Summoner's entry + SummonerType Type; ///< Summoner's type, see SummonerType for available types + uint8 SummonGroup; ///< Summon's group id }; /// Stores data for temp summons @@ -98,8 +90,6 @@ struct TempSummonData Milliseconds time; ///< Despawn time, usable only with certain temp summon types }; -#pragma pack(pop) - // DB scripting commands enum ScriptCommands { @@ -1515,7 +1505,7 @@ class TC_GAME_API ObjectMgr */ std::vector<TempSummonData> const* GetSummonGroup(uint32 summonerId, SummonerType summonerType, uint8 group) const { - TempSummonDataContainer::const_iterator itr = _tempSummonDataStore.find(TempSummonGroupKey(summonerId, summonerType, group)); + auto itr = _tempSummonDataStore.find({ .SummonerEntry = summonerId, .Type = summonerType, .SummonGroup = group }); if (itr != _tempSummonDataStore.end()) return &itr->second; |