Core/Vehicles: Remove redundant Vehicle::Die. All vehicle auras are already removed on Unit::RemoveAllAurasOnDeath.
Addresses ticket:869 - please reconfirm
This commit is contained in:
@@ -12402,8 +12402,6 @@ void Unit::setDeathState(DeathState s)
|
||||
ClearDiminishings();
|
||||
GetMotionMaster()->Clear(false);
|
||||
GetMotionMaster()->MoveIdle();
|
||||
if (m_vehicleKit)
|
||||
m_vehicleKit->Die();
|
||||
SendMonsterStop(true);
|
||||
//without this when removing IncreaseMaxHealth aura player may stuck with 1 hp
|
||||
//do not why since in IncreaseMaxHealth currenthealth is checked
|
||||
|
||||
@@ -141,15 +141,6 @@ void Vehicle::Uninstall()
|
||||
sScriptMgr->OnUninstall(this);
|
||||
}
|
||||
|
||||
void Vehicle::Die()
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Die Entry: %u, GuidLow: %u", m_creatureEntry, me->GetGUIDLow());
|
||||
RemoveAllPassengers();
|
||||
|
||||
if (GetBase()->GetTypeId() == TYPEID_UNIT)
|
||||
sScriptMgr->OnDie(this);
|
||||
}
|
||||
|
||||
void Vehicle::Reset()
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Reset");
|
||||
|
||||
@@ -120,7 +120,6 @@ class Vehicle
|
||||
void Install();
|
||||
void Uninstall();
|
||||
void Reset();
|
||||
void Die();
|
||||
void InstallAllAccessories();
|
||||
|
||||
Unit *GetBase() const { return me; }
|
||||
|
||||
@@ -954,15 +954,6 @@ void ScriptMgr::OnUninstall(Vehicle* veh)
|
||||
tmpscript->OnUninstall(veh);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnDie(Vehicle* veh)
|
||||
{
|
||||
ASSERT(veh);
|
||||
ASSERT(veh->GetBase()->GetTypeId() == TYPEID_UNIT);
|
||||
|
||||
GET_SCRIPT(VehicleScript, veh->GetBase()->ToCreature()->GetScriptId(), tmpscript);
|
||||
tmpscript->OnDie(veh);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnReset(Vehicle* veh)
|
||||
{
|
||||
ASSERT(veh);
|
||||
|
||||
@@ -584,9 +584,6 @@ class VehicleScript : public ScriptObject
|
||||
// Called after a vehicle is uninstalled.
|
||||
virtual void OnUninstall(Vehicle* /*veh*/) { }
|
||||
|
||||
// Called after a vehicle dies.
|
||||
virtual void OnDie(Vehicle* /*veh*/) { }
|
||||
|
||||
// Called when a vehicle resets.
|
||||
virtual void OnReset(Vehicle* /*veh*/) { }
|
||||
|
||||
@@ -898,7 +895,6 @@ class ScriptMgr
|
||||
|
||||
void OnInstall(Vehicle* veh);
|
||||
void OnUninstall(Vehicle* veh);
|
||||
void OnDie(Vehicle* veh);
|
||||
void OnReset(Vehicle* veh);
|
||||
void OnInstallAccessory(Vehicle* veh, Creature* accessory);
|
||||
void OnAddPassenger(Vehicle* veh, Unit* passenger, int8 seatId);
|
||||
|
||||
Reference in New Issue
Block a user