*Auto enter vehicle for summon vehicle spells.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-21 17:59:05 -06:00
parent e01e7d7934
commit b1e23bb904
2 changed files with 9 additions and 2 deletions
+2 -2
View File
@@ -6541,8 +6541,8 @@ void Aura::HandleAuraControlVehicle(bool apply, bool Real)
if(Pet *pet = m_target->GetPet()) if(Pet *pet = m_target->GetPet())
pet->Remove(PET_SAVE_AS_CURRENT); pet->Remove(PET_SAVE_AS_CURRENT);
WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0); //WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
((Player*)m_target)->GetSession()->SendPacket(&data); //((Player*)m_target)->GetSession()->SendPacket(&data);
} }
void Aura::HandleAuraConvertRune(bool apply, bool Real) void Aura::HandleAuraConvertRune(bool apply, bool Real)
+7
View File
@@ -6657,6 +6657,13 @@ void Spell::SummonVehicle(uint32 entry, SummonPropertiesEntry const *properties)
return; return;
vehicle->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id); vehicle->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
if(damage)
{
m_caster->CastSpell(vehicle, damage, true);
if(m_caster->GetTypeId() == TYPEID_PLAYER)
((Player*)m_caster)->EnterVehicle(vehicle);
}
} }
void Spell::GetSummonPosition(float &x, float &y, float &z, float radius, uint32 count) void Spell::GetSummonPosition(float &x, float &y, float &z, float radius, uint32 count)