aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp8
-rw-r--r--src/server/game/Entities/Creature/Creature.h4
-rw-r--r--src/server/game/Spells/Spell.cpp12
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp2
4 files changed, 13 insertions, 13 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index dcc10f978f7..29f263ff8ee 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1951,7 +1951,7 @@ void Creature::setDeathState(DeathState s)
SaveRespawnTime();
- ReleaseFocus(nullptr, false); // remove spellcast focus
+ ReleaseSpellFocus(nullptr, false); // remove spellcast focus
DoNotReacquireTarget(); // cancel delayed re-target
SetTarget(ObjectGuid::Empty); // drop target - dead mobs shouldn't ever target things
@@ -3038,7 +3038,7 @@ void Creature::SetTarget(ObjectGuid guid)
SetGuidValue(UNIT_FIELD_TARGET, guid);
}
-void Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target)
+void Creature::SetSpellFocusTarget(Spell const* focusSpell, WorldObject const* target)
{
// already focused
if (m_focusSpell)
@@ -3121,7 +3121,7 @@ bool Creature::HandleSpellFocus(Spell const* focusSpell, bool withDelay)
{
if (!IsAlive()) // dead creatures cannot focus
{
- ReleaseFocus(nullptr, false);
+ ReleaseSpellFocus(nullptr, false);
return false;
}
@@ -3142,7 +3142,7 @@ bool Creature::HandleSpellFocus(Spell const* focusSpell, bool withDelay)
return true;
}
-void Creature::ReleaseFocus(Spell const* focusSpell, bool withDelay)
+void Creature::ReleaseSpellFocus(Spell const* focusSpell, bool withDelay)
{
if (!m_focusSpell)
return;
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index e9e461fa33f..a6a24e662f4 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -342,9 +342,9 @@ class TC_GAME_API Creature : public Unit, public GridObject<Creature>, public Ma
void SetTarget(ObjectGuid guid) override;
void MustReacquireTarget() { m_shouldReacquireTarget = true; } // flags the Creature for forced (client displayed) target reacquisition in the next ::Update call
void DoNotReacquireTarget() { m_shouldReacquireTarget = false; m_suppressedTarget = ObjectGuid::Empty; SetGuidValue(UNIT_FIELD_TARGET, ObjectGuid::Empty); m_suppressedOrientation = 0.0f; }
- void FocusTarget(Spell const* focusSpell, WorldObject const* target);
+ void SetSpellFocusTarget(Spell const* focusSpell, WorldObject const* target);
bool HandleSpellFocus(Spell const* focusSpell = nullptr, bool withDelay = false) override;
- void ReleaseFocus(Spell const* focusSpell = nullptr, bool withDelay = true);
+ void ReleaseSpellFocus(Spell const* focusSpell = nullptr, bool withDelay = true);
bool IsMovementPreventedByCasting() const override;
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 947301abe7e..42fb5e2eab1 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3066,9 +3066,9 @@ SpellCastResult Spell::prepare(SpellCastTargets const& targets, AuraEffect const
if (!(m_spellInfo->IsNextMeleeSwingSpell() || IsAutoRepeat()))
{
if (m_targets.GetObjectTarget() && m_caster != m_targets.GetObjectTarget())
- m_caster->ToCreature()->FocusTarget(this, m_targets.GetObjectTarget());
+ m_caster->ToCreature()->SetSpellFocusTarget(this, m_targets.GetObjectTarget());
else if (m_spellInfo->HasAttribute(SPELL_ATTR5_DONT_TURN_DURING_CAST))
- m_caster->ToCreature()->FocusTarget(this, nullptr);
+ m_caster->ToCreature()->SetSpellFocusTarget(this, nullptr);
}
}
@@ -3314,7 +3314,7 @@ void Spell::_cast(bool skipCheck)
}
// if the spell allows the creature to turn while casting, then adjust server-side orientation to face the target now
- // client-side orientation is handled by the client itself, as the cast target is targeted due to Creature::FocusTarget
+ // client-side orientation is handled by the client itself, as the cast target is targeted due to Creature::SetSpellFocusTarget
if (m_caster->GetTypeId() == TYPEID_UNIT && !m_caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED))
if (!m_spellInfo->HasAttribute(SPELL_ATTR5_DONT_TURN_DURING_CAST))
if (WorldObject* objTarget = m_targets.GetObjectTarget())
@@ -3382,7 +3382,7 @@ void Spell::_cast(bool skipCheck)
if (!m_spellInfo->IsChanneled())
if (Creature* creatureCaster = m_caster->ToCreature())
- creatureCaster->ReleaseFocus(this);
+ creatureCaster->ReleaseSpellFocus(this);
// Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells
if ((m_spellInfo->Speed > 0.0f && !m_spellInfo->IsChanneled()) || m_spellInfo->HasAttribute(SPELL_ATTR4_UNK4))
@@ -3803,7 +3803,7 @@ void Spell::finish(bool ok)
}
if (Creature* creatureCaster = unitCaster->ToCreature())
- creatureCaster->ReleaseFocus(this);
+ creatureCaster->ReleaseSpellFocus(this);
if (!ok)
return;
@@ -4555,7 +4555,7 @@ void Spell::SendChannelStart(uint32 duration)
if (channelTarget != unitCaster->GetGUID())
if (Creature* creatureCaster = unitCaster->ToCreature())
if (!creatureCaster->HandleSpellFocus(this))
- creatureCaster->FocusTarget(this, ObjectAccessor::GetWorldObject(*creatureCaster, channelTarget));
+ creatureCaster->SetSpellFocusTarget(this, ObjectAccessor::GetWorldObject(*creatureCaster, channelTarget));
}
unitCaster->SetUInt32Value(UNIT_CHANNEL_SPELL, m_spellInfo->Id);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
index 0d537901ebe..2ddc9af56f3 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp
@@ -1821,7 +1821,7 @@ class spell_thorim_lightning_charge : public SpellScriptLoader
{
/// @workaround: focus target is not working because spell is triggered and instant
if (Creature* creature = GetCaster()->ToCreature())
- creature->FocusTarget(GetSpell(), GetExplTargetWorldObject());
+ creature->SetSpellFocusTarget(GetSpell(), GetExplTargetWorldObject());
}
void HandleCharge()