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:
Shauren
2011-04-22 21:59:37 +02:00
parent 7f73962c91
commit d73ffc9e81
14 changed files with 69 additions and 60 deletions
-2
View File
@@ -317,8 +317,6 @@ void VehicleAI::UpdateAI(const uint32 diff)
void VehicleAI::Reset()
{
me->SetVisible(true);
m_vehicle->Reset();
}
void VehicleAI::OnCharmed(bool apply)
+1 -1
View File
@@ -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)
+6 -1
View File
@@ -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();