File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,16 +55,6 @@ void ElunaMgr::Destroy(ElunaInfo const& info)
5555 Destroy (info.key );
5656}
5757
58- constexpr ElunaInfoKey ElunaInfoKey::MakeKey (uint32 mapId, uint32 instanceId)
59- {
60- return ElunaInfoKey (instanceId | (static_cast <uint64>(mapId) << 32 ));
61- }
62-
63- constexpr ElunaInfoKey ElunaInfoKey::MakeGlobalKey (uint32 instanceId)
64- {
65- return MakeKey (GLOBAL_MAP_ID , instanceId);
66- }
67-
6858ElunaInfo::ElunaInfo (uint32 mapId, uint32 instanceId)
6959{
7060 key = ElunaInfoKey::MakeKey (mapId, instanceId);
Original file line number Diff line number Diff line change @@ -18,13 +18,20 @@ struct ElunaInfoKey
1818public:
1919 constexpr ElunaInfoKey () : value(INVALID_KEY_VALUE ) {}
2020 constexpr ElunaInfoKey (uint64 key) : value(key) {}
21- ~ ElunaInfoKey () {}
21+ constexpr ElunaInfoKey (uint32 mapId, uint32 instanceId) : value(instanceId | ( static_cast <uint64>(mapId) << 32) ) {}
2222
2323 constexpr bool operator ==(const ElunaInfoKey& other) const { return value == other.value ; }
24+ constexpr bool operator !=(const ElunaInfoKey& other) const { return !(*this == other); }
2425
2526public:
26- static constexpr ElunaInfoKey MakeKey (uint32 mapId, uint32 instanceId);
27- static constexpr ElunaInfoKey MakeGlobalKey (uint32 instanceId);
27+ static constexpr ElunaInfoKey MakeKey (uint32 mapId, uint32 instanceId)
28+ {
29+ return ElunaInfoKey (instanceId | (static_cast <uint64>(mapId) << 32 ));
30+ }
31+ static constexpr ElunaInfoKey MakeGlobalKey (uint32 instanceId)
32+ {
33+ return MakeKey (GLOBAL_MAP_ID , instanceId);
34+ }
2835
2936 constexpr bool IsValid () const { return value != INVALID_KEY_VALUE ; };
3037 constexpr bool IsGlobal () const { return IsValid () && GetMapId () == GLOBAL_MAP_ID ; };
You can’t perform that action at this time.
0 commit comments