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:
blinkysc
2026-05-08 10:37:06 -05:00
committed by GitHub
parent db4bf267a8
commit fa2ce2b12f
2 changed files with 9 additions and 11 deletions

View File

@@ -313,7 +313,10 @@ void Vehicle::InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 typ
if (TempSummon* accessory = _me->SummonCreature(entry, *_me, TempSummonType(type), summonTime))
{
if (minion)
{
accessory->AddUnitTypeMask(UNIT_MASK_ACCESSORY);
accessory->GetThreatMgr().Initialize(); // reinitialize CanHaveThreatList cached value
}
if (!_me->HandleSpellClick(accessory, seatId))
{
@@ -455,9 +458,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
init.SetTransportEnter();
init.Launch();
// Transfer threat from passenger to vehicle
// Put the vehicle in combat with anything that was threatening the passenger; the threat itself stays on the passenger
for (auto const& [guid, threatRef] : unit->GetThreatMgr().GetThreatenedByMeList())
threatRef->GetOwner()->GetThreatMgr().AddThreat(_me, threatRef->GetThreat(), nullptr, true, true);
threatRef->GetOwner()->GetThreatMgr().AddThreat(_me, 0.0f, nullptr, true, true);
if (_me->IsCreature())
{