diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index f4e7b7c27..7cc706787 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -73,7 +73,7 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, SpellE SetEntry(spellId); SetObjectScale(DEFAULT_OBJECT_SCALE); - SetUInt64Value(DYNAMICOBJECT_CASTER, caster->GetGUID()); + SetGuidValue(DYNAMICOBJECT_CASTER, caster->GetObjectGuid()); /* Bytes field, so it's really 4 bit fields. These flags are unknown, but we do know that 0x00000001 is set for most. Farsight for example, does not have this flag, instead it has 0x80000002. @@ -103,7 +103,7 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, SpellE Unit* DynamicObject::GetCaster() const { // can be not found in some cases - return ObjectAccessor::GetUnit(*this, GetCasterGUID()); + return ObjectAccessor::GetUnit(*this, GetCasterGuid()); } void DynamicObject::Update(uint32 p_time) @@ -152,7 +152,7 @@ void DynamicObject::Delay(int32 delaytime) Unit *target = GetMap()->GetUnit((*iter)); if (target) { - SpellAuraHolder *holder = target->GetSpellAuraHolder(m_spellId, GetCasterGUID()); + SpellAuraHolder *holder = target->GetSpellAuraHolder(m_spellId, GetCasterGuid().GetRawValue()); if (!holder) { ++iter; @@ -175,7 +175,7 @@ void DynamicObject::Delay(int32 delaytime) continue; } - target->DelaySpellAuraHolder(m_spellId, delaytime, GetCasterGUID()); + target->DelaySpellAuraHolder(m_spellId, delaytime, GetCasterGuid().GetRawValue()); ++iter; } else @@ -185,11 +185,11 @@ void DynamicObject::Delay(int32 delaytime) bool DynamicObject::isVisibleForInState(Player const* u, WorldObject const* viewPoint, bool inVisibleList) const { - if(!IsInWorld() || !u->IsInWorld()) + if (!IsInWorld() || !u->IsInWorld()) return false; // always seen by owner - if(GetCasterGUID()==u->GetGUID()) + if (GetCasterGuid() == u->GetObjectGuid()) return true; // normal case diff --git a/src/game/DynamicObject.h b/src/game/DynamicObject.h index ea44dfefe..248214e2a 100644 --- a/src/game/DynamicObject.h +++ b/src/game/DynamicObject.h @@ -40,7 +40,7 @@ class DynamicObject : public WorldObject uint32 GetSpellId() const { return m_spellId; } SpellEffectIndex GetEffIndex() const { return m_effIndex; } uint32 GetDuration() const { return m_aliveDuration; } - uint64 GetCasterGUID() const { return GetUInt64Value(DYNAMICOBJECT_CASTER); } + ObjectGuid const& GetCasterGuid() const { return GetGuidValue(DYNAMICOBJECT_CASTER); } Unit* GetCaster() const; float GetRadius() const { return m_radius; } bool IsAffecting(Unit *unit) const { return m_affected.find(unit->GetObjectGuid()) != m_affected.end(); } diff --git a/src/game/Object.cpp b/src/game/Object.cpp index ccb3924f5..de9011bd7 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -2078,7 +2078,7 @@ bool WorldObject::IsControlledByPlayer() const case TYPEID_PLAYER: return ((Unit*)this)->IsCharmerOrOwnerPlayerOrPlayerItself(); case TYPEID_DYNAMICOBJECT: - return IS_PLAYER_GUID(((DynamicObject*)this)->GetCasterGUID()); + return ((DynamicObject*)this)->GetCasterGuid().IsPlayer(); case TYPEID_CORPSE: return true; default: diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 5e9698130..e1b005d12 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 "10749" + #define REVISION_NR "10750" #endif // __REVISION_NR_H__