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:
-3
@@ -172,9 +172,6 @@ public:
|
||||
uiChargeTimer = 5000;
|
||||
uiShieldBreakerTimer = 8000;
|
||||
uiBuffTimer = urand(30000,60000);
|
||||
|
||||
if (me->GetVehicleKit())
|
||||
me->GetVehicleKit()->Reset();
|
||||
}
|
||||
|
||||
void SetData(uint32 uiType, uint32 /*uiData*/)
|
||||
|
||||
@@ -162,8 +162,6 @@ class boss_ick : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit * /*who*/)
|
||||
{
|
||||
_vehicle->InstallAllAccessories();
|
||||
|
||||
if (Creature* krick = GetKrick())
|
||||
DoScriptText(SAY_KRICK_AGGRO, krick);
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ class boss_rimefang : public CreatureScript
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
_vehicle->InstallAllAccessories();
|
||||
_vehicle->InstallAllAccessories(false);
|
||||
}
|
||||
|
||||
void DoAction(const int32 actionId)
|
||||
|
||||
@@ -874,12 +874,6 @@ public:
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (Vehicle* veh = me->GetVehicleKit())
|
||||
veh->Reset();
|
||||
}
|
||||
|
||||
void PassengerBoarded(Unit* unit, int8 seat, bool apply)
|
||||
{
|
||||
if (apply)
|
||||
|
||||
@@ -221,7 +221,8 @@ class boss_flame_leviathan : public CreatureScript
|
||||
void InitializeAI()
|
||||
{
|
||||
ASSERT(vehicle);
|
||||
Reset();
|
||||
if (!me->isDead())
|
||||
Reset();
|
||||
ActiveTowersCount = 4;
|
||||
Shutdown = 0;
|
||||
ActiveTowers = false;
|
||||
@@ -255,12 +256,6 @@ class boss_flame_leviathan : public CreatureScript
|
||||
_Reset();
|
||||
Shutdown = 0;
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
if (me->GetVehicleKit())
|
||||
{
|
||||
me->GetVehicleKit()->Reset();
|
||||
if (me->GetVehicleKit()->GetPassenger(SEAT_CANNON))
|
||||
me->CastSpell(me->GetVehicleKit()->GetPassenger(SEAT_CANNON),AURA_STEALTH_DETECTION,false);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
@@ -344,7 +339,7 @@ class boss_flame_leviathan : public CreatureScript
|
||||
void SpellHit(Unit* /*caster*/, SpellEntry* const spell)
|
||||
{
|
||||
if (spell->Id == SPELL_START_THE_ENGINE)
|
||||
vehicle->InstallAllAccessories();
|
||||
vehicle->InstallAllAccessories(false);
|
||||
|
||||
if (spell->Id == SPELL_ELECTROSHOCK)
|
||||
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
@@ -594,12 +589,6 @@ class boss_flame_leviathan_seat : public CreatureScript
|
||||
InstanceScript* instance;
|
||||
Vehicle* vehicle;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (me->GetVehicleKit())
|
||||
me->GetVehicleKit()->Reset();
|
||||
}
|
||||
|
||||
void PassengerBoarded(Unit* who, int8 seatId, bool apply)
|
||||
{
|
||||
if (!me->GetVehicle())
|
||||
@@ -662,6 +651,7 @@ class boss_flame_leviathan_defense_cannon : public CreatureScript
|
||||
void Reset ()
|
||||
{
|
||||
NapalmTimer = 5000;
|
||||
DoCast(me, AURA_STEALTH_DETECTION);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
|
||||
Reference in New Issue
Block a user