*Make charge-like spells with talented warbringer correctly remove movement impairing auras.
*Fix Revitalize. *Use MaxHp of target instead of base hp for CC auras amount. --HG-- branch : trunk
This commit is contained in:
@@ -1484,7 +1484,10 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
|
|||||||
( 58620, 0x00, 15, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Glyph of Chains of Ice
|
( 58620, 0x00, 15, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 0, 0), -- Glyph of Chains of Ice
|
||||||
( 56342, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
|
( 56342, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
|
||||||
( 56343, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
|
( 56343, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
|
||||||
( 56344, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0); -- Lock and Load
|
( 56344, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
|
||||||
|
( 48539, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize
|
||||||
|
( 48544, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize
|
||||||
|
( 48545, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0); -- Revitalize
|
||||||
|
|
||||||
|
|
||||||
-- --------
|
-- --------
|
||||||
|
|||||||
+6
-1
@@ -4758,9 +4758,14 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||||||
}
|
}
|
||||||
case SPELL_EFFECT_CHARGE:
|
case SPELL_EFFECT_CHARGE:
|
||||||
{
|
{
|
||||||
|
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR)
|
||||||
|
{
|
||||||
|
// Warbringer - can't be handled in proc system - should be done before checkcast root check and charge effect process
|
||||||
|
if (strict && m_caster->IsScriptOverriden(m_spellInfo, 6953))
|
||||||
|
m_caster->RemoveMovementImpairingAuras();
|
||||||
|
}
|
||||||
if (m_caster->hasUnitState(UNIT_STAT_ROOT))
|
if (m_caster->hasUnitState(UNIT_STAT_ROOT))
|
||||||
return SPELL_FAILED_ROOTED;
|
return SPELL_FAILED_ROOTED;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_EFFECT_SKINNING:
|
case SPELL_EFFECT_SKINNING:
|
||||||
|
|||||||
@@ -4367,7 +4367,7 @@ void AuraEffect::HandleModMechanicImmunity(bool apply, bool Real, bool /*changeA
|
|||||||
mechanic=IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
mechanic=IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
||||||
// Forbearance
|
// Forbearance
|
||||||
// in DBC wrong mechanic immune since 3.0.x
|
// in DBC wrong mechanic immune since 3.0.x
|
||||||
else if (GetId() == 25771)
|
else if (GetId() == 25771)
|
||||||
mechanic = 1 << MECHANIC_IMMUNE_SHIELD;
|
mechanic = 1 << MECHANIC_IMMUNE_SHIELD;
|
||||||
|
|
||||||
if (!mechanic)
|
if (!mechanic)
|
||||||
@@ -7451,7 +7451,7 @@ int32 AuraEffect::CalculateCrowdControlAuraAmount(Unit * caster)
|
|||||||
m_auraName !=SPELL_AURA_MOD_ROOT)
|
m_auraName !=SPELL_AURA_MOD_ROOT)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
int32 damageCap = (int32)(m_target->GetCreateHealth()*0.10f);
|
int32 damageCap = (int32)(m_target->GetMaxHealth()*0.10f);
|
||||||
|
|
||||||
if (!caster)
|
if (!caster)
|
||||||
return damageCap;
|
return damageCap;
|
||||||
@@ -7462,7 +7462,7 @@ int32 AuraEffect::CalculateCrowdControlAuraAmount(Unit * caster)
|
|||||||
{
|
{
|
||||||
if((*itr)->isAffectedOnSpell(m_spellProto))
|
if((*itr)->isAffectedOnSpell(m_spellProto))
|
||||||
{
|
{
|
||||||
// Glyph of Fear
|
// Glyph of Fear, Glyph of Frost nova and similar auras
|
||||||
if ((*itr)->GetMiscValue() == 7801)
|
if ((*itr)->GetMiscValue() == 7801)
|
||||||
{
|
{
|
||||||
damageCap += (int32)(damageCap*(*itr)->GetAmount()/100.0f);
|
damageCap += (int32)(damageCap*(*itr)->GetAmount()/100.0f);
|
||||||
|
|||||||
@@ -2965,6 +2965,12 @@ void Spell::EffectEnergize(uint32 i)
|
|||||||
if(unitTarget->GetMaxPower(power) == 0)
|
if(unitTarget->GetMaxPower(power) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Spells which use pct of max mana, but have wrong effect
|
||||||
|
if (m_spellInfo->Id == 48542)
|
||||||
|
{
|
||||||
|
damage = damage * unitTarget->GetMaxPower(power) / 100;
|
||||||
|
}
|
||||||
|
|
||||||
m_caster->EnergizeBySpell(unitTarget, m_spellInfo->Id, damage, power);
|
m_caster->EnergizeBySpell(unitTarget, m_spellInfo->Id, damage, power);
|
||||||
|
|
||||||
// Mad Alchemist's Potion
|
// Mad Alchemist's Potion
|
||||||
@@ -4379,19 +4385,8 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
|
|||||||
{
|
{
|
||||||
// Skyshatter Harness item set bonus
|
// Skyshatter Harness item set bonus
|
||||||
// Stormstrike
|
// Stormstrike
|
||||||
if(m_spellInfo->SpellFamilyFlags[1] & 0x0010)
|
if (AuraEffect * aurEff = m_caster->IsScriptOverriden(m_spellInfo, 5634))
|
||||||
{
|
m_caster->CastSpell(m_caster, 38430, true, NULL, aurEff);
|
||||||
Unit::AuraEffectList const& m_OverrideClassScript = m_caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
|
||||||
for(Unit::AuraEffectList::const_iterator citr = m_OverrideClassScript.begin(); citr != m_OverrideClassScript.end(); ++citr)
|
|
||||||
{
|
|
||||||
// Stormstrike AP Buff
|
|
||||||
if ( (*citr)->GetMiscValue() == 5634 )
|
|
||||||
{
|
|
||||||
m_caster->CastSpell(m_caster, 38430, true, NULL, *citr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_DRUID:
|
case SPELLFAMILY_DRUID:
|
||||||
|
|||||||
@@ -4346,6 +4346,18 @@ AuraEffect* Unit::GetAura(AuraType type, uint32 family, uint32 familyFlag1, uint
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AuraEffect * Unit::IsScriptOverriden(SpellEntry const * spell, int32 script) const
|
||||||
|
{
|
||||||
|
AuraEffectList const& auras = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||||
|
for(AuraEffectList::const_iterator i = auras.begin();i != auras.end(); ++i)
|
||||||
|
{
|
||||||
|
if ((*i)->GetMiscValue() == script)
|
||||||
|
if ((*i)->isAffectedOnSpell(spell))
|
||||||
|
return (*i);
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
uint32 Unit::GetDiseasesByCaster(uint64 casterGUID, bool remove)
|
uint32 Unit::GetDiseasesByCaster(uint64 casterGUID, bool remove)
|
||||||
{
|
{
|
||||||
static const AuraType diseaseAuraTypes[] =
|
static const AuraType diseaseAuraTypes[] =
|
||||||
@@ -7931,6 +7943,21 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, AuraE
|
|||||||
CastCustomSpell(this, 47762, &basepoints0, 0, 0, true, 0, triggeredByAura);
|
CastCustomSpell(this, 47762, &basepoints0, 0, 0, true, 0, triggeredByAura);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
case 7010: // Revitalize - can proc on full hp target
|
||||||
|
case 7011:
|
||||||
|
case 7012:
|
||||||
|
{
|
||||||
|
if (!roll_chance_i(triggeredByAura->GetAmount()))
|
||||||
|
return false;
|
||||||
|
switch(pVictim->getPowerType())
|
||||||
|
{
|
||||||
|
case POWER_MANA: triggered_spell_id = 48542; break;
|
||||||
|
case POWER_RAGE: triggered_spell_id = 48541; break;
|
||||||
|
case POWER_ENERGY: triggered_spell_id = 48540; break;
|
||||||
|
case POWER_RUNIC_POWER: triggered_spell_id = 48543; break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// not processed
|
// not processed
|
||||||
|
|||||||
+2
-1
@@ -1594,7 +1594,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
|||||||
|
|
||||||
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const;
|
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const;
|
||||||
Aura * GetAura(uint32 spellId, uint64 casterGUID = 0) const;
|
Aura * GetAura(uint32 spellId, uint64 casterGUID = 0) const;
|
||||||
AuraEffect* GetAura(AuraType type, uint32 family, uint32 familyFlag1 , uint32 familyFlag2=0, uint32 familyFlag3=0, uint64 casterGUID=0);
|
AuraEffect * GetAura(AuraType type, uint32 family, uint32 familyFlag1 , uint32 familyFlag2=0, uint32 familyFlag3=0, uint64 casterGUID=0);
|
||||||
|
AuraEffect * IsScriptOverriden(SpellEntry const * spell, int32 script) const;
|
||||||
bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster = 0) const;
|
bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster = 0) const;
|
||||||
bool HasAura(uint32 spellId, uint64 caster = 0) const;
|
bool HasAura(uint32 spellId, uint64 caster = 0) const;
|
||||||
bool HasAura(Aura * aur) const;
|
bool HasAura(Aura * aur) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user