*Fix shadow bite bonus per dot on target.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-06-12 13:01:42 +02:00
parent f7c50a6f01
commit bc7a381b62
3 changed files with 34 additions and 1 deletions
+10 -1
View File
@@ -474,7 +474,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage += int32(damage*0.25f);
}
// Conflagrate - consumes immolate
if (m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE)
else if (m_spellInfo->TargetAuraState == AURA_STATE_IMMOLATE)
{
// Glyph of Conflagrate
if (m_caster->HasAura(56235))
@@ -491,6 +491,15 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
}
}
}
// Shadow Bite
else if (m_spellInfo->SpellFamilyFlags[1] & 0x400000)
{
if (m_caster->GetTypeId() == TYPEID_UNIT && ((Creature *)m_caster)->isPet())
{
// Get DoTs on target by owner (5% increase by dot)
damage += 5 * unitTarget->GetDoTsByCaster(m_caster->GetOwnerGUID()) / 100;
}
}
break;
}
case SPELLFAMILY_PRIEST:
+23
View File
@@ -4422,6 +4422,29 @@ uint32 Unit::GetDiseasesByCaster(uint64 casterGUID) const
return diseases;
}
uint32 Unit::GetDoTsByCaster(uint64 casterGUID) const
{
static const AuraType diseaseAuraTypes[] =
{
SPELL_AURA_PERIODIC_DAMAGE,
SPELL_AURA_PERIODIC_DAMAGE_PERCENT,
SPELL_AURA_NONE
};
uint32 dots=0;
for(AuraType const* itr = &diseaseAuraTypes[0]; itr && itr[0] != SPELL_AURA_NONE; ++itr)
{
Unit::AuraEffectList const& auras = GetAurasByType(*itr);
for(AuraEffectList::const_iterator i = auras.begin();i != auras.end(); ++i)
{
// Get auras by caster
if ((*i)->GetCasterGUID()==casterGUID)
++dots;
}
}
return dots;
}
void Unit::AddDynObject(DynamicObject* dynObj)
{
m_dynObjGUIDs.push_back(dynObj->GetGUID());
+1
View File
@@ -1564,6 +1564,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
bool HasAuraType(AuraType auraType) const;
bool HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const;
uint32 GetDiseasesByCaster(uint64 casterGUID) const;
uint32 GetDoTsByCaster(uint64 casterGUID) const;
int32 GetTotalAuraModifier(AuraType auratype) const;
float GetTotalAuraMultiplier(AuraType auratype) const;