Skip to content

Commit eb811b5

Browse files
author
Rochet2
committed
Merge TrinityCore 3.3.5 to ElunaTrinityWotlk [skip ci]
2 parents d7bb564 + 93ab97a commit eb811b5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/server/game/Spells/Spell.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5433,7 +5433,9 @@ SpellCastResult Spell::CheckCast(bool strict, uint32* param1 /*= nullptr*/, uint
54335433
if (m_spellInfo->RequiresSpellFocus)
54345434
{
54355435
focusObject = SearchSpellFocus();
5436-
if (!focusObject)
5436+
if (focusObject)
5437+
m_focusObjectGUID = focusObject->GetGUID();
5438+
else
54375439
return SPELL_FAILED_REQUIRES_SPELL_FOCUS;
54385440
}
54395441

@@ -7291,6 +7293,9 @@ bool Spell::UpdatePointers()
72917293
m_originalCaster = nullptr;
72927294
}
72937295

7296+
if (m_focusObjectGUID)
7297+
focusObject = ObjectAccessor::GetGameObject(*m_caster, m_focusObjectGUID);
7298+
72947299
if (m_castItemGUID && m_caster->GetTypeId() == TYPEID_PLAYER)
72957300
{
72967301
m_CastItem = m_caster->ToPlayer()->GetItemByGuid(m_castItemGUID);

src/server/game/Spells/Spell.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ class TC_GAME_API Spell
530530
DynObjAura* _dynObjAura;
531531

532532
// -------------------------------------------
533+
ObjectGuid m_focusObjectGUID;
533534
GameObject* focusObject;
534535

535536
// Damage and healing in effects need just calculate

0 commit comments

Comments
 (0)