*Fix rend and tear talent.
*Allow hots to proc only if spellfamilyflags are specified in spell_proc_event. --HG-- branch : trunk
This commit is contained in:
@@ -1515,7 +1515,7 @@ void AuraEffect::HandleShapeshiftBoosts(bool apply)
|
|||||||
if (GetMiscValue() == FORM_CAT)
|
if (GetMiscValue() == FORM_CAT)
|
||||||
{
|
{
|
||||||
// Nurturing Instinct
|
// Nurturing Instinct
|
||||||
if (AuraEffect const * aurEff = m_target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254))
|
if (AuraEffect const * aurEff = m_target->GetAuraEffect(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT, SPELLFAMILY_DRUID, 2254,0))
|
||||||
{
|
{
|
||||||
uint32 spellId = 0;
|
uint32 spellId = 0;
|
||||||
switch (aurEff->GetId())
|
switch (aurEff->GetId())
|
||||||
@@ -1533,7 +1533,7 @@ void AuraEffect::HandleShapeshiftBoosts(bool apply)
|
|||||||
// Survival of the Fittest
|
// Survival of the Fittest
|
||||||
else if (GetMiscValue() == FORM_BEAR || GetMiscValue() == FORM_DIREBEAR)
|
else if (GetMiscValue() == FORM_BEAR || GetMiscValue() == FORM_DIREBEAR)
|
||||||
{
|
{
|
||||||
if (AuraEffect const * aurEff = m_target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE,SPELLFAMILY_DRUID, 961))
|
if (AuraEffect const * aurEff = m_target->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE,SPELLFAMILY_DRUID, 961, 0))
|
||||||
{
|
{
|
||||||
int32 bp = m_target->CalculateSpellDamage(aurEff->GetSpellProto(),2,aurEff->GetSpellProto()->EffectBasePoints[2],m_target);
|
int32 bp = m_target->CalculateSpellDamage(aurEff->GetSpellProto(),2,aurEff->GetSpellProto()->EffectBasePoints[2],m_target);
|
||||||
m_target->CastCustomSpell(m_target, 62069,&bp, NULL, NULL, true, 0, this);
|
m_target->CastCustomSpell(m_target, 62069,&bp, NULL, NULL, true, 0, this);
|
||||||
@@ -7394,7 +7394,7 @@ void AuraEffect::HandleReflectSpells( bool Apply, bool Real , bool /*changeAmoun
|
|||||||
if (Unit * caster = GetCaster())
|
if (Unit * caster = GetCaster())
|
||||||
{
|
{
|
||||||
// Improved Spell Reflection
|
// Improved Spell Reflection
|
||||||
if (caster->GetDummyAura(SPELLFAMILY_WARRIOR,1935))
|
if (caster->GetDummyAura(SPELLFAMILY_WARRIOR,1935, 0))
|
||||||
{
|
{
|
||||||
// aura remove - remove auras from all party members
|
// aura remove - remove auras from all party members
|
||||||
std::list<Unit*> PartyMembers;
|
std::list<Unit*> PartyMembers;
|
||||||
|
|||||||
@@ -4366,6 +4366,14 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
|
|||||||
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||||
((Player*)m_caster)->AddComboPoints(unitTarget,1, this);
|
((Player*)m_caster)->AddComboPoints(unitTarget,1, this);
|
||||||
}
|
}
|
||||||
|
// Shred, Maul - Rend and Tear
|
||||||
|
else if (m_spellInfo->SpellFamilyFlags[0] & 0x00008800 && unitTarget->HasAuraState(AURA_STATE_BLEEDING, m_spellInfo, m_caster))
|
||||||
|
{
|
||||||
|
if (AuraEffect const* rendAndTear = m_caster->GetDummyAura(SPELLFAMILY_DRUID, 2859, 0))
|
||||||
|
{
|
||||||
|
totalDamagePercentMod *= float((rendAndTear->GetAmount() + 100.0f) / 100.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELLFAMILY_DEATHKNIGHT:
|
case SPELLFAMILY_DEATHKNIGHT:
|
||||||
@@ -4375,7 +4383,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
|
|||||||
{
|
{
|
||||||
bool consumeDiseases = true;
|
bool consumeDiseases = true;
|
||||||
// Annihilation
|
// Annihilation
|
||||||
if (AuraEffect * aurEff = m_caster->GetDummyAura(SPELLFAMILY_DEATHKNIGHT, 2710))
|
if (AuraEffect * aurEff = m_caster->GetDummyAura(SPELLFAMILY_DEATHKNIGHT, 2710, 0))
|
||||||
{
|
{
|
||||||
// Do not consume diseases if roll sucesses
|
// Do not consume diseases if roll sucesses
|
||||||
if (roll_chance_i(aurEff->GetAmount()))
|
if (roll_chance_i(aurEff->GetAmount()))
|
||||||
@@ -5232,7 +5240,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
// Invigoration
|
// Invigoration
|
||||||
case 53412:
|
case 53412:
|
||||||
{
|
{
|
||||||
if (AuraEffect * aurEff = unitTarget->GetDummyAura(SPELLFAMILY_HUNTER, 3487))
|
if (AuraEffect * aurEff = unitTarget->GetDummyAura(SPELLFAMILY_HUNTER, 3487, 0))
|
||||||
{
|
{
|
||||||
if (roll_chance_i(aurEff->GetAmount()))
|
if (roll_chance_i(aurEff->GetAmount()))
|
||||||
unitTarget->CastSpell(unitTarget, 53398, true);
|
unitTarget->CastSpell(unitTarget, 53398, true);
|
||||||
|
|||||||
@@ -1346,7 +1346,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (procExtra & PROC_EX_INTERNAL_REQ_FAMILY)
|
if (procExtra & (PROC_EX_INTERNAL_REQ_FAMILY | PROC_EX_INTERNAL_HOT))
|
||||||
{
|
{
|
||||||
if (!hasFamilyMask)
|
if (!hasFamilyMask)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+27
-15
@@ -7804,7 +7804,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
|||||||
if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||||
if (Unit * owner = GetOwner())
|
if (Unit * owner = GetOwner())
|
||||||
{
|
{
|
||||||
if (AuraEffect * aurEff = owner->GetDummyAura(SPELLFAMILY_WARLOCK, 3220))
|
if (AuraEffect * aurEff = owner->GetDummyAura(SPELLFAMILY_WARLOCK, 3220, 0))
|
||||||
{
|
{
|
||||||
basepoints0 = int32((aurEff->GetAmount() * owner->SpellBaseDamageBonus(SpellSchoolMask(SPELL_SCHOOL_MASK_MAGIC)) + 100.0f) / 100.0f);
|
basepoints0 = int32((aurEff->GetAmount() * owner->SpellBaseDamageBonus(SpellSchoolMask(SPELL_SCHOOL_MASK_MAGIC)) + 100.0f) / 100.0f);
|
||||||
CastCustomSpell(this,trigger_spell_id,&basepoints0,&basepoints0,NULL,true,castItem,triggeredByAura);
|
CastCustomSpell(this,trigger_spell_id,&basepoints0,&basepoints0,NULL,true,castItem,triggeredByAura);
|
||||||
@@ -9305,17 +9305,17 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||||||
// Improved Icy Touch
|
// Improved Icy Touch
|
||||||
if (spellProto->SpellFamilyFlags[0] & 0x2)
|
if (spellProto->SpellFamilyFlags[0] & 0x2)
|
||||||
{
|
{
|
||||||
if (AuraEffect * aurEff = GetDummyAura(SPELLFAMILY_DEATHKNIGHT, 2721))
|
if (AuraEffect * aurEff = GetDummyAura(SPELLFAMILY_DEATHKNIGHT, 2721, 0))
|
||||||
DoneTotalMod *= (100.0f + aurEff->GetAmount()) / 100.0f ;
|
DoneTotalMod *= (100.0f + aurEff->GetAmount()) / 100.0f ;
|
||||||
}
|
}
|
||||||
// Glacier Rot
|
// Glacier Rot
|
||||||
if (spellProto->SpellFamilyFlags[0] & 0x2 || spellProto->SpellFamilyFlags[1] & 0x6)
|
if (spellProto->SpellFamilyFlags[0] & 0x2 || spellProto->SpellFamilyFlags[1] & 0x6)
|
||||||
{
|
{
|
||||||
if (AuraEffect * aurEff = GetDummyAura(SPELLFAMILY_DEATHKNIGHT, 196))
|
if (AuraEffect * aurEff = GetDummyAura(SPELLFAMILY_DEATHKNIGHT, 196, 0))
|
||||||
DoneTotalMod *= (100.0f + aurEff->GetAmount()) / 100.0f;
|
DoneTotalMod *= (100.0f + aurEff->GetAmount()) / 100.0f;
|
||||||
}
|
}
|
||||||
// This is not a typo - Impurity has SPELLFAMILY_DRUID
|
// This is not a typo - Impurity has SPELLFAMILY_DRUID
|
||||||
if (AuraEffect * aurEff = GetDummyAura(SPELLFAMILY_DRUID, 1986))
|
if (AuraEffect * aurEff = GetDummyAura(SPELLFAMILY_DRUID, 1986, 0))
|
||||||
ApCoeffMod *= (100.0f + aurEff->GetAmount()) / 100.0f;
|
ApCoeffMod *= (100.0f + aurEff->GetAmount()) / 100.0f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -9627,12 +9627,30 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_DAMAGE_CLASS_MELEE:
|
case SPELL_DAMAGE_CLASS_MELEE:
|
||||||
|
if (pVictim)
|
||||||
|
{
|
||||||
|
// Custom crit by class
|
||||||
|
switch(spellProto->SpellFamilyName)
|
||||||
|
{
|
||||||
|
case SPELLFAMILY_DRUID:
|
||||||
|
// Rend and Tear - bonus crit chance for bleeding targets of Ferocious Bite
|
||||||
|
if (spellProto->SpellFamilyFlags[0] & 0x00800000 && pVictim->HasAuraState(AURA_STATE_BLEEDING, spellProto, this))
|
||||||
|
{
|
||||||
|
if (AuraEffect const* rendAndTear = GetDummyAura(SPELLFAMILY_DRUID, 2859, 1))
|
||||||
|
{
|
||||||
|
crit_chance += rendAndTear->GetAmount();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
case SPELL_DAMAGE_CLASS_RANGED:
|
case SPELL_DAMAGE_CLASS_RANGED:
|
||||||
{
|
{
|
||||||
if (pVictim)
|
if (pVictim)
|
||||||
{
|
{
|
||||||
crit_chance = GetUnitCriticalChance(attackType, pVictim);
|
crit_chance += GetUnitCriticalChance(attackType, pVictim);
|
||||||
crit_chance+= GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, schoolMask);
|
crit_chance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, schoolMask);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -10268,14 +10286,6 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
|
|||||||
TakenTotalMod *= (mod+100.0f)/100.0f;
|
TakenTotalMod *= (mod+100.0f)/100.0f;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
//Mangle
|
|
||||||
case 2312:
|
|
||||||
if(spellProto==NULL)
|
|
||||||
break;
|
|
||||||
// Should increase Shred (initial Damage of Lacerate and Rake handled in Spell::EffectSchoolDMG)
|
|
||||||
if(spellProto->SpellFamilyName==SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags.IsEqual (0x00008000,0,0))
|
|
||||||
TakenTotalMod *= (100.0f+(*i)->GetAmount())/100.0f;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13343,11 +13353,13 @@ AuraEffect* Unit::GetDummyAura( uint32 spell_id ) const
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId) const
|
AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const
|
||||||
{
|
{
|
||||||
Unit::AuraEffectList const& mDummy = GetAurasByType(type);
|
Unit::AuraEffectList const& mDummy = GetAurasByType(type);
|
||||||
for(Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
|
for(Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
|
||||||
{
|
{
|
||||||
|
if (effIndex != (*itr)->GetEffIndex())
|
||||||
|
continue;
|
||||||
SpellEntry const * spell = (*itr)->GetSpellProto();
|
SpellEntry const * spell = (*itr)->GetSpellProto();
|
||||||
if (spell->SpellIconID == iconId && spell->SpellFamilyName == name
|
if (spell->SpellIconID == iconId && spell->SpellFamilyName == name
|
||||||
&& !spell->SpellFamilyFlags)
|
&& !spell->SpellFamilyFlags)
|
||||||
|
|||||||
+2
-2
@@ -1580,8 +1580,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
|||||||
bool HasAuraType(AuraType auraType) const;
|
bool HasAuraType(AuraType auraType) const;
|
||||||
bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const;
|
bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const;
|
||||||
AuraEffect* GetDummyAura(uint32 spell_id) const;
|
AuraEffect* GetDummyAura(uint32 spell_id) const;
|
||||||
inline AuraEffect* GetDummyAura(SpellFamilyNames name, uint32 iconId) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId);}
|
inline AuraEffect* GetDummyAura(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId, effIndex);}
|
||||||
AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId) const;
|
AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const;
|
||||||
uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false);
|
uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false);
|
||||||
uint32 GetDoTsByCaster(uint64 casterGUID) const;
|
uint32 GetDoTsByCaster(uint64 casterGUID) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user