Core/Spells: Implemented SPELL_ATTR6_TAPS_IMMEDIATELY
This commit is contained in:
1 parent
f93918ef0c
commit
f35e49b515
3 files changed
+10
-6
No files matched your search
@@ -2776,9 +2776,18 @@ 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())
|
||||
{
|
||||
if (!unitCaster->IsCreature() || !unitCaster->ToCreature()->IsTrigger())
|
||||
{
|
||||
unitCaster->AtTargetAttacked(unit, spell->m_spellInfo->CausesInitialThreat() && !unitCaster->IsIgnoringCombat());
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user