mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
fix (core): EffectInstaKill Prevents spell animation fix (#10379)
* fix (core): EffectInstaKill Prevents spell animation before deal damage execution This fixes the issue of spell animations of chain effects of a spell dealing with EffectInstaKill. This was identified as a issue in support of @malcrom 's current scripting efforts. We fix the issue by putting a half second delay and making the delay of a function possible and independent. Co-Authored-By: Malcrom <malcromdev@gmail.com> * Fix double to float Co-Authored-By: Malcrom <malcromdev@gmail.com> * Remove the STD I put the STD in STUD and all I need is U * Update src/server/game/Spells/SpellEffects.cpp per @kitzunu the great Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> * Update src/server/game/Spells/SpellEffects.cpp per @nefertumm the beast Co-authored-by: Nefertumm <nefertum.dev@protonmail.com> * Update src/server/game/Spells/SpellEffects.cpp Co-authored-by: Kargatum <dowlandtop@yandex.com> * Update src/server/game/Spells/SpellEffects.cpp Co-authored-by: Kargatum <dowlandtop@yandex.com> * Update src/server/game/Spells/SpellEffects.cpp Co-authored-by: Kargatum <dowlandtop@yandex.com> * Update src/server/game/Spells/SpellEffects.cpp Co-authored-by: Kargatum <dowlandtop@yandex.com> * Update src/server/game/Spells/SpellEffects.cpp Co-authored-by: Kargatum <dowlandtop@yandex.com> * Notes Added Co-authored-by: Malcrom <malcromdev@gmail.com> Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Co-authored-by: Nefertumm <nefertum.dev@protonmail.com> Co-authored-by: Kargatum <dowlandtop@yandex.com>
This commit is contained in:
@@ -293,6 +293,9 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/)
|
||||
data << unitTarget->GetGUID();
|
||||
data << uint32(m_spellInfo->Id);
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
// MDic - acidmanifesto: This is needed due to the Unit::DealDamage firing off immediately after the worldpacket which nerfs out additional spell animations
|
||||
// The delay of half a second ensures the spell animations which are typically 0.4 seconds long have enough time to fire off
|
||||
std::this_thread::sleep_for(500ms);
|
||||
|
||||
Unit::DealDamage(m_caster, unitTarget, unitTarget->GetHealth(), nullptr, NODAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user