*Allow dest target spells to proc spellcast.

*Allow source target spells to be triggered during spellproc if no unit target avalible.

--HG--
branch : trunk
This commit is contained in:
QAston committed 2009-07-05 16:58:42 +02:00
1 parent a7f55ece55
commit 67f8ec608c
6 files changed
+59 -8

No files matched your search

+11
View File
@@ -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)