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

@@ -209,6 +209,8 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) c
updatetype = UPDATETYPE_CREATE_OBJECT2;
break;
default:
if (((GameObject*)this)->GetOwner())
updatetype = UPDATETYPE_CREATE_OBJECT2;
break;
}
}

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
{

View File

@@ -410,6 +410,8 @@ class Spell
// handler helpers
void _handle_immediate_phase();
void _handle_finish_phase();
void OnSpellLaunch();
SpellCastResult CheckItems();
SpellCastResult CheckSpellFocus();

View File

@@ -132,6 +132,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto,
// Faerie Fire
else if (spellproto->SpellFamilyFlags[0] & 0x400)
return DIMINISHING_LIMITONLY;
// Feral Charge Root Effect
else if (spellproto->Id == 45334)
return DIMINISHING_NONE;
break;
}
case SPELLFAMILY_ROGUE: