Core/Vehicles:
* Added generic solution for vehicle accessories not relying on AI calls * Only accessories marked as minion will be respawned when the vehicle enters evade mode * Notify the summoner's AI when vehicle accessory fails to install and despawns
This commit is contained in:
@@ -317,8 +317,6 @@ void VehicleAI::UpdateAI(const uint32 diff)
|
||||
void VehicleAI::Reset()
|
||||
{
|
||||
me->SetVisible(true);
|
||||
|
||||
m_vehicle->Reset();
|
||||
}
|
||||
|
||||
void VehicleAI::OnCharmed(bool apply)
|
||||
|
||||
@@ -155,7 +155,7 @@ void CreatureAI::EnterEvadeMode()
|
||||
Reset();
|
||||
|
||||
if (me->IsVehicle()) // use the same sequence of addtoworld, aireset may remove all summons!
|
||||
me->GetVehicleKit()->Reset();
|
||||
me->GetVehicleKit()->Reset(true);
|
||||
}
|
||||
|
||||
/*void CreatureAI::AttackedBy(Unit* attacker)
|
||||
|
||||
@@ -549,8 +549,13 @@ inline bool CreatureAI::_EnterEvadeMode()
|
||||
if (!me->isAlive())
|
||||
return false;
|
||||
|
||||
// call specialized vehicle remove auras if creature is one
|
||||
if (!me->IsVehicle())
|
||||
me->RemoveAllAuras();
|
||||
else
|
||||
me->RemoveAllAurasExceptVehicle();
|
||||
|
||||
// sometimes bosses stuck in combat?
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
me->CombatStop(true);
|
||||
me->LoadCreaturesAddon();
|
||||
|
||||
@@ -516,9 +516,6 @@ void BossAI::_Reset()
|
||||
if (!me->isAlive())
|
||||
return;
|
||||
|
||||
if (me->GetVehicleKit())
|
||||
me->GetVehicleKit()->Reset();
|
||||
|
||||
me->ResetLootMode();
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
|
||||
Reference in New Issue
Block a user