aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-03 10:56:00 -0600
committermegamage <none@none>2009-01-03 10:56:00 -0600
commitfa00f43c5c597da6c13e51522695b2ec8e972cf9 (patch)
tree7d7eeebb62b7191c8d9bd65565a4b467cf98b475 /src/game/Unit.cpp
parent89fb5ffcd6c6dcf194a957766a37c3fa7b246153 (diff)
*Mangos [7011] Add check Aura Spell req in Spell::CanCast. By DiSlord.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 40d867a2574..694003fbc97 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -4012,6 +4012,17 @@ Aura* Unit::GetAura(uint32 spellId, uint32 effindex)
return NULL;
}
+bool Unit::isAuraPresent(uint32 spellId)
+{
+ for (int i=0; i<3; ++i)
+ {
+ AuraMap::iterator iter = m_Auras.find(spellEffectPair(spellId, i));
+ if (iter != m_Auras.end())
+ return true;
+ }
+ return false;
+}
+
void Unit::AddDynObject(DynamicObject* dynObj)
{
m_dynObjGUIDs.push_back(dynObj->GetGUID());