Add Diminishing_None to Feral Charge. And Add Blizzlike Animations to Flags / Chest Captures. (#664)

* Add Diminishing_None to Feral Charge.

Closes https://github.com/azerothcore/azerothcore-wotlk/issues/648

Credit: AnonXS @L4G_Core

* Update Spell.h

* Add blizzlike ecapturing flag / chest animation

Code from Nostalrius.

* Add missing blizzlike animations.

Demonic Circle: Summon, Soul well, Ritual of Summoning. There's probably more.

* Update Object.cpp
This commit is contained in:
lineagedr
2017-10-08 18:13:19 +03:00
committed by Yehonal
parent 10809d9113
commit 7df5d0964f
4 changed files with 31 additions and 0 deletions

View File

@@ -3341,6 +3341,8 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
}
LoadScripts();
OnSpellLaunch();
m_powerCost = m_CastItem ? 0 : m_spellInfo->CalcPowerCost(m_caster, m_spellSchoolMask, this);
// Set combo point requirement
@@ -8280,6 +8282,28 @@ void Spell::CancelGlobalCooldown()
m_caster->ToPlayer()->GetGlobalCooldownMgr().CancelGlobalCooldown(m_spellInfo);
}
void Spell::OnSpellLaunch()
{
if (!m_caster || !m_caster->IsInWorld())
return;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(24390);
// Make sure the player is sending a valid GO target and lock ID. SPELL_EFFECT_OPEN_LOCK
// can succeed with a lockId of 0
if (m_spellInfo->Id == 21651)
{
if (GameObject *go = m_targets.GetGOTarget())
{
LockEntry const *lockInfo = sLockStore.LookupEntry(go->GetGOInfo()->GetLockId());
if (lockInfo && lockInfo->Index[1] == LOCKTYPE_SLOW_OPEN)
{
Spell* visual = new Spell(m_caster, spellInfo, TRIGGERED_NONE);
visual->prepare(&m_targets);
}
}
}
}
namespace Trinity
{