*Implement spellhaste mod for Channeled spells.
*Fix build with VCPP. --HG-- branch : trunk
This commit is contained in:
1 parent
651e7c29eb
commit
40bf3b630a
9 files changed
+77
-16
No files matched your search
+2
-13
@@ -244,19 +244,8 @@ uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell const* spell)
|
||||
|
||||
int32 castTime = spellCastTimeEntry->CastTime;
|
||||
|
||||
if (spell)
|
||||
{
|
||||
if(Player* modOwner = spell->GetCaster()->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(spellInfo->Id, SPELLMOD_CASTING_TIME, castTime, spell);
|
||||
|
||||
if( !(spellInfo->Attributes & (SPELL_ATTR_UNK4|SPELL_ATTR_UNK5)) )
|
||||
castTime = int32(castTime * spell->GetCaster()->GetFloatValue(UNIT_MOD_CAST_SPEED));
|
||||
else
|
||||
{
|
||||
if (spell->IsRangedSpell() && !spell->IsAutoRepeat())
|
||||
castTime = int32(castTime * spell->GetCaster()->m_modAttackSpeedPct[RANGED_ATTACK]);
|
||||
}
|
||||
}
|
||||
if (spell && spell->GetCaster())
|
||||
spell->GetCaster()->ModSpellCastTime(spellInfo, castTime);
|
||||
|
||||
if (spellInfo->Attributes & SPELL_ATTR_RANGED && (!spell || !(spell->IsAutoRepeat())))
|
||||
castTime += 500;
|
||||
|
||||
Reference in new issue
Block a user