*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:
QAston
2009-06-28 19:39:15 +02:00
parent 70ac70208c
commit 81ac49f00a
5 changed files with 43 additions and 23 deletions
+3 -3
View File
@@ -1515,7 +1515,7 @@ void AuraEffect::HandleShapeshiftBoosts(bool apply)
if (GetMiscValue() == FORM_CAT)
{
// 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;
switch (aurEff->GetId())
@@ -1533,7 +1533,7 @@ void AuraEffect::HandleShapeshiftBoosts(bool apply)
// Survival of the Fittest
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);
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())
{
// Improved Spell Reflection
if (caster->GetDummyAura(SPELLFAMILY_WARRIOR,1935))
if (caster->GetDummyAura(SPELLFAMILY_WARRIOR,1935, 0))
{
// aura remove - remove auras from all party members
std::list<Unit*> PartyMembers;
+10 -2
View File
@@ -4366,6 +4366,14 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
if(m_caster->GetTypeId()==TYPEID_PLAYER)
((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;
}
case SPELLFAMILY_DEATHKNIGHT:
@@ -4375,7 +4383,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
{
bool consumeDiseases = true;
// 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
if (roll_chance_i(aurEff->GetAmount()))
@@ -5232,7 +5240,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
// Invigoration
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()))
unitTarget->CastSpell(unitTarget, 53398, true);
+1 -1
View File
@@ -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)
return false;
+27 -15
View File
@@ -7804,7 +7804,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
if (GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
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);
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
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 ;
}
// Glacier Rot
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;
}
// 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;
break;
}
@@ -9627,12 +9627,30 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
break;
}
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:
{
if (pVictim)
{
crit_chance = GetUnitCriticalChance(attackType, pVictim);
crit_chance+= GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, schoolMask);
crit_chance += GetUnitCriticalChance(attackType, pVictim);
crit_chance += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_SPELL_CRIT_CHANCE_SCHOOL, schoolMask);
}
break;
}
@@ -10268,14 +10286,6 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
TakenTotalMod *= (mod+100.0f)/100.0f;
}
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;
}
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);
for(Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
{
if (effIndex != (*itr)->GetEffIndex())
continue;
SpellEntry const * spell = (*itr)->GetSpellProto();
if (spell->SpellIconID == iconId && spell->SpellFamilyName == name
&& !spell->SpellFamilyFlags)
+2 -2
View File
@@ -1580,8 +1580,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
bool HasAuraType(AuraType auraType) const;
bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const;
AuraEffect* GetDummyAura(uint32 spell_id) const;
inline AuraEffect* GetDummyAura(SpellFamilyNames name, uint32 iconId) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId);}
AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId) const;
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, uint8 effIndex) const;
uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false);
uint32 GetDoTsByCaster(uint64 casterGUID) const;