mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
fix(Core/Spells): Improvements to Far Sight spell: (#11683)
* fix(Core/Spells): Improvements to Far Sight spell: Far Sight should not interrupt while casting another spell. Corrected setting Far Sight object as an active object. Fixed grid activation range for active dynamic objects. When Far Sight is over, the camera be reset to player. Enable swapping camera between Far Sight and Sentry Totem. Fixes #6368 * Update. * Update.
This commit is contained in:
@@ -2719,6 +2719,9 @@ void Spell::EffectAddFarsight(SpellEffIndex effIndex)
|
||||
if (!m_caster->IsInWorld())
|
||||
return;
|
||||
|
||||
// Remove old farsight if exist
|
||||
bool updateViewerVisibility = m_caster->RemoveDynObject(m_spellInfo->Id);
|
||||
|
||||
DynamicObject* dynObj = new DynamicObject(true);
|
||||
if (!dynObj->CreateDynamicObject(m_caster->GetMap()->GenerateLowGuid<HighGuid::DynamicObject>(), m_caster, m_spellInfo->Id, *destTarget, radius, DYNAMIC_OBJECT_FARSIGHT_FOCUS))
|
||||
{
|
||||
@@ -2727,9 +2730,7 @@ void Spell::EffectAddFarsight(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
dynObj->SetDuration(duration);
|
||||
dynObj->SetCasterViewpoint();
|
||||
|
||||
m_caster->ToPlayer()->UpdateVisibilityForPlayer();
|
||||
dynObj->SetCasterViewpoint(updateViewerVisibility);
|
||||
}
|
||||
|
||||
void Spell::EffectUntrainTalents(SpellEffIndex /*effIndex*/)
|
||||
|
||||
Reference in New Issue
Block a user