diff --git a/src/game/ObjectGuid.h b/src/game/ObjectGuid.h index 1e4c41bd4..03e837236 100644 --- a/src/game/ObjectGuid.h +++ b/src/game/ObjectGuid.h @@ -102,9 +102,6 @@ class MANGOS_DLL_SPEC ObjectGuid void Set(uint64 const& guid) { m_guid = guid; } void Clear() { m_guid = 0; } - // Possible removed in future for more strict control type conversions - void operator= (uint64 const& guid) { m_guid = guid; } - PackedGuid WriteAsPacked() const; public: // accessors uint64 const& GetRawValue() const { return m_guid; } diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 6ac090508..eabf9ecdf 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5012,7 +5012,7 @@ SpellCastResult Spell::CheckCast(bool strict) if (m_spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN && m_spellInfo->SpellIconID == 33) { // fire totems slot - if (!m_caster->GetTotemGUID(TOTEM_SLOT_FIRE)) + if (m_caster->GetTotemGuid(TOTEM_SLOT_FIRE).IsEmpty()) return SPELL_FAILED_TOTEMS; } break; diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e45c38e75..573642ca2 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -207,9 +207,6 @@ Unit::Unit() m_addDmgOnce = 0; - for(int i = 0; i < MAX_TOTEM_SLOT; ++i) - m_TotemSlot[i] = 0; - m_ObjectSlot[0] = m_ObjectSlot[1] = m_ObjectSlot[2] = m_ObjectSlot[3] = 0; //m_Aura = NULL; //m_AurasCheck = 2000; @@ -6005,7 +6002,7 @@ Unit* Unit::_GetTotem(TotemSlot slot) const Totem* Unit::GetTotem(TotemSlot slot ) const { - if(slot >= MAX_TOTEM_SLOT || !IsInWorld()) + if(slot >= MAX_TOTEM_SLOT || !IsInWorld() || m_TotemSlot[slot].IsEmpty()) return NULL; Creature *totem = GetMap()->GetCreature(m_TotemSlot[slot]); @@ -6015,23 +6012,23 @@ Totem* Unit::GetTotem(TotemSlot slot ) const bool Unit::IsAllTotemSlotsUsed() const { for (int i = 0; i < MAX_TOTEM_SLOT; ++i) - if (!m_TotemSlot[i]) + if (m_TotemSlot[i].IsEmpty()) return false; return true; } void Unit::_AddTotem(TotemSlot slot, Totem* totem) { - m_TotemSlot[slot] = totem->GetGUID(); + m_TotemSlot[slot] = totem->GetObjectGuid(); } void Unit::_RemoveTotem(Totem* totem) { for(int i = 0; i < MAX_TOTEM_SLOT; ++i) { - if (m_TotemSlot[i] == totem->GetGUID()) + if (m_TotemSlot[i] == totem->GetObjectGuid()) { - m_TotemSlot[i] = 0; + m_TotemSlot[i].Clear(); break; } } diff --git a/src/game/Unit.h b/src/game/Unit.h index 3683a1eea..bfa878eff 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1552,7 +1552,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject CharmInfo* GetCharmInfo() { return m_charmInfo; } CharmInfo* InitCharmInfo(Unit* charm); - uint64 const& GetTotemGUID(TotemSlot slot) const { return m_TotemSlot[slot]; } + ObjectGuid const& GetTotemGuid(TotemSlot slot) const { return m_TotemSlot[slot]; } Totem* GetTotem(TotemSlot slot) const; bool IsAllTotemSlotsUsed() const; @@ -2041,7 +2041,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject GuardianPetList m_guardianPets; - uint64 m_TotemSlot[MAX_TOTEM_SLOT]; + ObjectGuid m_TotemSlot[MAX_TOTEM_SLOT]; private: // Error traps for some wrong args using // this will catch and prevent build for any cases when all optional args skipped and instead triggered used non boolean type diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 4d7046031..4bd0f108e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11329" + #define REVISION_NR "11330" #endif // __REVISION_NR_H__