aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellMgr.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-07-05 16:58:42 +0200
committerQAston <none@none>2009-07-05 16:58:42 +0200
commit67f8ec608c09b039f96dd321f83a18da31f453af (patch)
treef2c8bf18ac6ee7995d4a865ba15c864ef1fc1eeb /src/game/SpellMgr.cpp
parenta7f55ece5549e3d41cefc5daea7241a9bef13bfe (diff)
*Allow dest target spells to proc spellcast.
*Allow source target spells to be triggered during spellproc if no unit target avalible. --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r--src/game/SpellMgr.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index b99997dd526..32759951f84 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -236,6 +236,7 @@ SpellMgr::SpellMgr()
}
}
+
SpellMgr::~SpellMgr()
{
}
@@ -246,6 +247,16 @@ SpellMgr& SpellMgr::Instance()
return spellMgr;
}
+bool SpellMgr::IsSrcTargetSpell(SpellEntry const *spellInfo) const
+{
+ for (uint8 i = 0; i< MAX_SPELL_EFFECTS; ++i)
+ {
+ if(SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_AREA_SRC || SpellTargetType[spellInfo->EffectImplicitTargetB[i]] == TARGET_TYPE_AREA_SRC)
+ return true;
+ }
+ return false;
+}
+
int32 GetSpellDuration(SpellEntry const *spellInfo)
{
if(!spellInfo)