*Fix shadow bite bonus per dot on target.
--HG-- branch : trunk
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user