mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
*Apply proc effects such as frostbite after the spell hits the target.
--HG-- branch : trunk
This commit is contained in:
@@ -2206,25 +2206,24 @@ void Spell::cast(bool skipCheck)
|
||||
|
||||
FillTargetMap();
|
||||
|
||||
if(m_spellState == SPELL_STATE_FINISHED) // stop cast if spell marked as finish somewhere in Take*/FillTargetMap
|
||||
{
|
||||
SetExecutedCurrently(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// traded items have trade slot instead of guid in m_itemTargetGUID
|
||||
// set to real guid to be sent later to the client
|
||||
m_targets.updateTradeSlotItem();
|
||||
|
||||
// CAST SPELL
|
||||
SendSpellCooldown();
|
||||
|
||||
if(!m_IsTriggeredSpell)
|
||||
{
|
||||
//TakePower();
|
||||
TakeReagents(); // we must remove reagents before HandleEffects to allow place crafted item in same slot
|
||||
}
|
||||
|
||||
if(m_spellState == SPELL_STATE_FINISHED) // stop cast if spell marked as finish somewhere in Take*/FillTargetMap
|
||||
{
|
||||
SetExecutedCurrently(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// CAST SPELL
|
||||
SendSpellCooldown();
|
||||
SendCastResult(castResult);
|
||||
SendSpellGo(); // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()...
|
||||
|
||||
@@ -2270,10 +2269,13 @@ void Spell::cast(bool skipCheck)
|
||||
{
|
||||
// Calculate chance at that moment (can be depend for example from combo points)
|
||||
int32 chance = m_caster->CalculateSpellDamage(auraSpellInfo, auraSpellIdx, (*i)->GetBasePoints(),unit);
|
||||
chance *= (*i)->GetStackAmount();
|
||||
|
||||
if(roll_chance_i(chance))
|
||||
for (int j=0; j != (*i)->GetStackAmount(); ++j)
|
||||
m_caster->CastSpell(unit, auraSpellInfo->EffectTriggerSpell[auraSpellIdx], true, NULL, (*i));
|
||||
{
|
||||
if(SpellEntry const *spellInfo = sSpellStore.LookupEntry(auraSpellInfo->EffectTriggerSpell[auraSpellIdx]))
|
||||
m_TriggerSpells.push_back(spellInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user