diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 27f848caa..00450bd80 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -15356,14 +15356,13 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) std::string taxi_nodes = fields[37].GetCppString(); // clear channel spell data (if saved at channel spell casting) - SetChannelObjectGUID(0); + SetChannelObjectGuid(ObjectGuid()); SetUInt32Value(UNIT_CHANNEL_SPELL,0); // clear charm/summon related fields SetCharm(NULL); SetPet(NULL); SetTargetGuid(ObjectGuid()); - SetChannelObjectGUID(0); SetCharmerGUID(0); SetOwnerGUID(0); SetCreatorGUID(0); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 90476d505..c46115780 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3808,12 +3808,12 @@ void Spell::SendChannelUpdate(uint32 time) { m_caster->RemoveAurasByCasterSpell(m_spellInfo->Id, m_caster->GetGUID()); - ObjectGuid target_guid = m_caster->GetChannelObjectGUID(); + ObjectGuid target_guid = m_caster->GetChannelObjectGuid(); if (target_guid != m_caster->GetObjectGuid() && target_guid.IsUnit()) if (Unit* target = ObjectAccessor::GetUnit(*m_caster, target_guid)) target->RemoveAurasByCasterSpell(m_spellInfo->Id, m_caster->GetGUID()); - m_caster->SetChannelObjectGUID(0); + m_caster->SetChannelObjectGuid(ObjectGuid()); m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, 0); } @@ -3861,7 +3861,7 @@ void Spell::SendChannelStart(uint32 duration) m_timer = duration; if (target) - m_caster->SetChannelObjectGUID(target->GetGUID()); + m_caster->SetChannelObjectGuid(target->GetObjectGuid()); m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, m_spellInfo->Id); } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 534875933..3f2fa28b9 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -6892,7 +6892,7 @@ void Aura::PeriodicTick() // ignore non positive values (can be result apply spellmods to aura damage uint32 pdamage = m_modifier.m_amount > 0 ? m_modifier.m_amount : 0; - DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s energize %s (TypeId: %u) for %u dmg inflicted by %u", + DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %s energize %s for %u dmg inflicted by %u", GetCasterGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str(), pdamage, GetId()); if(m_modifier.m_miscvalue < 0 || m_modifier.m_miscvalue >= MAX_POWERS) @@ -8885,7 +8885,7 @@ void SpellAuraHolder::Update(uint32 diff) } // need check distance for channeled target only - if (caster->GetChannelObjectGUID() == m_target->GetGUID()) + if (caster->GetChannelObjectGuid() == m_target->GetObjectGuid()) { // Get spell range float max_range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(m_spellProto->rangeIndex)); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 4a42df086..cf4041baf 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -7774,7 +7774,7 @@ void Spell::EffectTransmitted(SpellEffectIndex eff_idx) { case GAMEOBJECT_TYPE_FISHINGNODE: { - m_caster->SetChannelObjectGUID(pGameObj->GetGUID()); + m_caster->SetChannelObjectGuid(pGameObj->GetObjectGuid()); m_caster->AddGameObject(pGameObj); // will removed at spell cancel // end time of range when possible catch fish (FISHING_BOBBER_READY_TIME..GetDuration(m_spellInfo)) diff --git a/src/game/Unit.h b/src/game/Unit.h index 8669b7104..9b7aebadb 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1485,8 +1485,8 @@ class MANGOS_DLL_SPEC Unit : public WorldObject void SetCharmGUID(uint64 charm) { SetUInt64Value(UNIT_FIELD_CHARM, charm); } ObjectGuid const& GetTargetGuid() const { return GetGuidValue(UNIT_FIELD_TARGET); } void SetTargetGuid(ObjectGuid targetGuid) { SetGuidValue(UNIT_FIELD_TARGET, targetGuid); } - uint64 GetChannelObjectGUID() const { return GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT); } - void SetChannelObjectGUID(uint64 targetGuid) { SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, targetGuid); } + ObjectGuid const& GetChannelObjectGuid() const { return GetGuidValue(UNIT_FIELD_CHANNEL_OBJECT); } + void SetChannelObjectGuid(ObjectGuid targetGuid) { SetGuidValue(UNIT_FIELD_CHANNEL_OBJECT, targetGuid); } uint64 GetCharmerOrOwnerGUID() const { return GetCharmerGUID() ? GetCharmerGUID() : GetOwnerGUID(); } uint64 GetCharmerOrOwnerOrOwnGUID() const diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 3e4f91203..017ec520f 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 "10629" + #define REVISION_NR "10630" #endif // __REVISION_NR_H__