fix(Core/Vehicles): Remove incorrect passenger->vehicle threat redirection (#25719)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com> Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -206,6 +206,10 @@ void ThreatReference::HeapNotifyDecreased()
|
||||
if (tWho->GetSummonerGUID().IsPlayer())
|
||||
return false;
|
||||
|
||||
// accessories are fully treated as components of the parent and cannot have threat
|
||||
if (cWho->HasUnitTypeMask(UNIT_MASK_ACCESSORY))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -396,15 +400,6 @@ void ThreatManager::AddThreat(Unit* target, float amount, SpellInfo const* spell
|
||||
return;
|
||||
}
|
||||
|
||||
// while riding a vehicle, all threat goes to the vehicle, not the pilot
|
||||
if (Unit* vehicle = target->GetVehicleBase())
|
||||
{
|
||||
AddThreat(vehicle, amount, spell, ignoreModifiers, ignoreRedirects);
|
||||
if (target->HasUnitTypeMask(UNIT_MASK_ACCESSORY)) // accessories are fully treated as components of the parent and cannot have threat
|
||||
return;
|
||||
amount = 0.0f;
|
||||
}
|
||||
|
||||
// if we cannot actually have a threat list, we instead just set combat state and avoid creating threat refs altogether
|
||||
if (!CanHaveThreatList())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user