aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 1283068269b..02262d1500c 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2847,8 +2847,15 @@ void Spell::TargetInfo::DoDamageAndTriggers(Spell* spell)
if (MissCondition != SPELL_MISS_EVADE && _spellHitTarget && !spell->m_caster->IsFriendlyTo(unit) && (!spell->IsPositive() || spell->m_spellInfo->HasEffect(SPELL_EFFECT_DISPEL)))
{
if (Unit* unitCaster = spell->m_caster->ToUnit())
+ {
unitCaster->AtTargetAttacked(unit, spell->m_spellInfo->HasInitialAggro());
+ if (spell->m_spellInfo->HasAttribute(SPELL_ATTR6_TAPS_IMMEDIATELY))
+ if (Creature* targetCreature = unit->ToCreature())
+ if (!targetCreature->hasLootRecipient() && unitCaster->IsPlayer())
+ targetCreature->SetLootRecipient(unitCaster);
+ }
+
if (!spell->m_spellInfo->HasAttribute(SPELL_ATTR3_DO_NOT_TRIGGER_TARGET_STAND) && !unit->IsStandState())
unit->SetStandState(UNIT_STAND_STATE_STAND);
}