diff options
author | QAston <none@none> | 2009-06-12 13:01:42 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-06-12 13:01:42 +0200 |
commit | bc7a381b6236f98369f23cf012565b3bb590618d (patch) | |
tree | 6bb9a536f5b46966c06607a65739ffd5251b8dd1 /src/game/Unit.cpp | |
parent | f7c50a6f01042e401e7dee664d140857d42b7fa5 (diff) |
*Fix shadow bite bonus per dot on target.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ed183277901..aa08549d336 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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()); |