mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
*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:
@@ -4346,6 +4346,18 @@ AuraEffect* Unit::GetAura(AuraType type, uint32 family, uint32 familyFlag1, uint
|
||||
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)
|
||||
{
|
||||
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);
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user