mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Implemented SPELL_ATTR6_TAPS_IMMEDIATELY
This commit is contained in:
@@ -8409,11 +8409,6 @@ void Unit::AtTargetAttacked(Unit* target, bool canInitialAggro)
|
||||
if (Unit* targetOwner = target->GetCharmerOrOwner())
|
||||
targetOwner->EngageWithTarget(this);
|
||||
|
||||
//Patch 3.0.8: All player spells which cause a creature to become aggressive to you will now also immediately cause the creature to be tapped.
|
||||
if (Creature* creature = target->ToCreature())
|
||||
if (!creature->hasLootRecipient() && GetTypeId() == TYPEID_PLAYER)
|
||||
creature->SetLootRecipient(this);
|
||||
|
||||
Player* myPlayerOwner = GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
Player* targetPlayerOwner = target->GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
if (myPlayerOwner && targetPlayerOwner && !(myPlayerOwner->duel && myPlayerOwner->duel->Opponent == targetPlayerOwner))
|
||||
|
||||
@@ -649,7 +649,7 @@ enum SpellAttr6 : uint32
|
||||
SPELL_ATTR6_AURA_ICON_ONLY_FOR_CASTER_LIMIT_10 = 0x00100000, // TITLE Aura Icon Only For Caster (Limit 10) (client only)
|
||||
SPELL_ATTR6_SHOW_MECHANIC_AS_COMBAT_TEXT = 0x00200000, // TITLE Show Mechanic as Combat Text (client only)
|
||||
SPELL_ATTR6_ABSORB_CANNOT_BE_IGNORE = 0x00400000, // TITLE Absorb Cannot Be Ignore
|
||||
SPELL_ATTR6_TAPS_IMMEDIATELY = 0x00800000, /*NYI*/ // TITLE Taps immediately
|
||||
SPELL_ATTR6_TAPS_IMMEDIATELY = 0x00800000, // TITLE Taps immediately
|
||||
SPELL_ATTR6_CAN_TARGET_UNTARGETABLE = 0x01000000, // TITLE Can Target Untargetable
|
||||
SPELL_ATTR6_DOESNT_RESET_SWING_TIMER_IF_INSTANT = 0x02000000, // TITLE Doesn't Reset Swing Timer if Instant
|
||||
SPELL_ATTR6_VEHICLE_IMMUNITY_CATEGORY = 0x04000000, /*NYI*/ // TITLE Vehicle Immunity Category
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user