Core/Vehicles: Make the vehicle system more aura driven. Get rid of redundant checks and update relevant data.

Closes #805
This commit is contained in:
Machiavelli
2011-03-04 21:17:06 +01:00
parent c2a2d7201b
commit a9582964d3
14 changed files with 80 additions and 79 deletions
@@ -659,7 +659,6 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
deathbringer->CastSpell(me, SPELL_RIDE_VEHICLE, true); // for the packet logs.
deathbringer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
deathbringer->setDeathState(ALIVE);
deathbringer->EnterVehicle(vehicle, 0);
}
events.ScheduleEvent(EVENT_OUTRO_HORDE_5, 1000); // move
events.ScheduleEvent(EVENT_OUTRO_HORDE_6, 4000); // say
@@ -1251,7 +1251,7 @@ class spell_putricide_mutated_transformation : public SpellScriptLoader
caster->CastSpell(summon, SPELL_MUTATED_TRANSFORMATION_NAME, true);
summon->CastSpell(summon, SPELL_ABOMINATION_VEHICLE_POWER_DRAIN, true);
summon->CastSpell(summon, SPELL_MUTATED_TRANSFORMATION_DAMAGE, true);
caster->EnterVehicle(summon->GetVehicleKit(), 0);
caster->EnterVehicle(summon, 0);
summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, GetSpellInfo()->Id);
summon->SetCreatorGUID(caster->GetGUID());
@@ -307,12 +307,11 @@ public:
return;
for(std::list<Creature*>::const_iterator itr = lSeats.begin(); itr != lSeats.end(); itr++)
{
Vehicle* pSeat = (*itr)->GetVehicleKit();
if (Creature* pTurret = (me->SummonCreature(33142, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_MANUAL_DESPAWN)))
pTurret->EnterVehicle(pSeat, SEAT_TURRET);
pTurret->EnterVehicle((*itr), SEAT_TURRET);
if (Creature* pDevice = (me->SummonCreature(33143, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_MANUAL_DESPAWN)))
pDevice->EnterVehicle(pSeat, SEAT_DEVICE);
pDevice->EnterVehicle((*itr), SEAT_DEVICE);
}
}
else
@@ -138,6 +138,7 @@ class boss_kologarn : public CreatureScript
void Reset()
{
_Reset();
eyebeamTarget = 0;
}
@@ -330,7 +331,7 @@ class boss_kologarn : public CreatureScript
// HACK: We should send spell SPELL_ARM_ENTER_VEHICLE here, but this will not work, because
// the aura system will not allow it to stack from two different casters
int32 seatId = arm->GetEntry() == NPC_LEFT_ARM ? 0 : 1;
arm->EnterVehicle(vehicle, seatId);
arm->CastCustomSpell(SPELL_ARM_ENTER_VEHICLE, SPELLVALUE_BASE_POINT0, seatId+1, me, true);
arm->CastSpell(arm, SPELL_ARM_ENTER_VISUAL, true);
}
};