Merge branch 'trickerer/mulreflect' into master
Close pull request #11288
This commit is contained in:
commit
10b7480e70
3 files changed
+63
-3
No files matched your search
@@ -14333,7 +14333,18 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
|
||||
|
||||
// Remove charge (aura can be removed by triggers)
|
||||
if (prepare && useCharges && takeCharges)
|
||||
i->aura->DropCharge();
|
||||
{
|
||||
// Set charge drop delay (only for missiles)
|
||||
if ((procExtra & PROC_EX_REFLECT) && target && procSpell && procSpell->Speed > 0.0f)
|
||||
{
|
||||
// Set up missile speed based delay (from Spell.cpp: Spell::AddUnitTarget()::L2237)
|
||||
uint32 delay = uint32(std::floor(std::max<float>(target->GetDistance(this), 5.0f) / procSpell->Speed * 1000.0f));
|
||||
// Schedule charge drop
|
||||
i->aura->DropChargeDelayed(delay);
|
||||
}
|
||||
else
|
||||
i->aura->DropCharge();
|
||||
}
|
||||
|
||||
i->aura->CallScriptAfterProcHandlers(aurApp, eventInfo);
|
||||
|
||||
|
||||
Reference in new issue
Block a user