*Fix dash bonus not working in some cases.
--HG-- branch : trunk
This commit is contained in:
+14
-2
@@ -512,6 +512,8 @@ m_target(parentAura->GetTarget()), m_tickNumber(0)
|
||||
// Start periodic on next tick or at aura apply
|
||||
if (!(m_spellProto->AttributesEx5 & SPELL_ATTR_EX5_START_PERIODIC_AT_APPLY))
|
||||
m_periodicTimer += m_amplitude;
|
||||
|
||||
m_isApplied = false;
|
||||
}
|
||||
|
||||
AreaAuraEffect::AreaAuraEffect(Aura * parentAura, uint32 effIndex, int32 * currentBasePoints, Unit * caster, Item * castItem, Unit * source)
|
||||
@@ -3229,8 +3231,15 @@ void AuraEffect::HandleAuraModShapeshift(bool apply, bool Real, bool changeAmoun
|
||||
{
|
||||
if(form == FORM_CAT && apply) // add dash if in cat-from
|
||||
{
|
||||
if(AuraEffect * aurEff =m_target->GetAura(SPELL_AURA_MOD_INCREASE_SPEED, SPELLFAMILY_DRUID, 0, 0, 0x8))
|
||||
m_target->HandleAuraEffect(aurEff, true);
|
||||
Unit::AuraMap & auras = m_target->GetAuras();
|
||||
for (Unit::AuraMap::iterator iter = auras.begin(); iter != auras.end();++iter)
|
||||
{
|
||||
Aura * aur = iter->second;
|
||||
if (aur->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID && aur->GetSpellProto()->SpellFamilyFlags[2] & 0x8)
|
||||
{
|
||||
m_target->HandleAuraEffect(aur->GetPartAura(0), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // remove dash effect(not buff) if out of cat-from
|
||||
{
|
||||
@@ -4108,7 +4117,10 @@ void AuraEffect::HandleAuraModIncreaseSpeed(bool apply, bool Real, bool changeAm
|
||||
|
||||
if(apply) // Dash wont work if you are not in cat form
|
||||
if(m_spellProto->SpellFamilyName==SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[2] & 0x8 && m_target->m_form != FORM_CAT )
|
||||
{
|
||||
m_target->HandleAuraEffect(this, false);
|
||||
return;
|
||||
}
|
||||
|
||||
m_target->UpdateSpeed(MOVE_RUN, true);
|
||||
}
|
||||
|
||||
@@ -350,6 +350,8 @@ class TRINITY_DLL_SPEC AuraEffect
|
||||
bool IsAreaAura() const { return m_isAreaAura; }
|
||||
bool IsPeriodic() const { return m_isPeriodic; }
|
||||
bool IsPersistent() const { return m_isPersistent; }
|
||||
bool IsApplied() const { return m_isApplied; }
|
||||
void SetApplied (bool val) {m_isApplied = val; }
|
||||
bool isAffectedOnSpell(SpellEntry const *spell) const;
|
||||
|
||||
void ApplyModifier(bool apply, bool Real = false, bool changeAmount=false);
|
||||
@@ -392,6 +394,7 @@ class TRINITY_DLL_SPEC AuraEffect
|
||||
bool m_isPeriodic:1;
|
||||
bool m_isAreaAura:1;
|
||||
bool m_isPersistent:1;
|
||||
bool m_isApplied:1;
|
||||
};
|
||||
|
||||
class TRINITY_DLL_SPEC AreaAuraEffect : public AuraEffect
|
||||
|
||||
+8
-1
@@ -13104,7 +13104,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue( AuraEffect* triggeredByAura )
|
||||
CastCustomSpell(target,spellProto->Id,&heal,NULL,NULL,true,NULL,triggeredByAura,caster->GetGUID());
|
||||
if (Aura * aur = target->GetAura(spellProto->Id, caster->GetGUID()))
|
||||
aur->SetAuraCharges(jumps);
|
||||
//caster->SpellHealingBonus(this, spellProto, heal, HEAL);
|
||||
caster->SpellHealingBonus(this, spellProto, heal, HEAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13857,11 +13857,18 @@ void Unit::HandleAuraEffect(AuraEffect * aureff, bool apply)
|
||||
return;
|
||||
if (apply)
|
||||
{
|
||||
if (aureff->IsApplied())
|
||||
return;
|
||||
|
||||
aureff->SetApplied(true);
|
||||
m_modAuras[aureff->GetAuraName()].push_back(aureff);
|
||||
aureff->ApplyModifier(true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!aureff->IsApplied())
|
||||
return;
|
||||
aureff->SetApplied(false);
|
||||
// remove from list before mods removing (prevent cyclic calls, mods added before including to aura list - use reverse order)
|
||||
m_modAuras[aureff->GetAuraName()].remove(aureff);
|
||||
aureff->ApplyModifier(false, true);
|
||||
|
||||
Reference in New Issue
Block a user