aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/SpellAuras.cpp4
-rw-r--r--src/game/SpellEffects.cpp7
-rw-r--r--src/game/Unit.cpp6
3 files changed, 13 insertions, 4 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index f01195b2b23..0cf768d8f51 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6541,8 +6541,8 @@ void Aura::HandleAuraControlVehicle(bool apply, bool Real)
if(Pet *pet = m_target->GetPet())
pet->Remove(PET_SAVE_AS_CURRENT);
- WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
- ((Player*)m_target)->GetSession()->SendPacket(&data);
+ //WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
+ //((Player*)m_target)->GetSession()->SendPacket(&data);
}
void Aura::HandleAuraConvertRune(bool apply, bool Real)
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 742fc30fd69..1d92b6aa6ec 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -6657,6 +6657,13 @@ void Spell::SummonVehicle(uint32 entry, SummonPropertiesEntry const *properties)
return;
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)
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index af26cdbfa2f..023bbf5df5b 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -13047,7 +13047,8 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess)
}
// Pets already have a properly initialized CharmInfo, don't overwrite it.
- if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT && !((Creature*)this)->HasSummonMask(SUMMON_MASK_GUARDIAN))
+ if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT
+ && !((Creature*)this)->HasSummonMask(SUMMON_MASK_GUARDIAN) && !((Creature*)this)->isPet())
{
CharmInfo *charmInfo = InitCharmInfo();
if(possess)
@@ -13168,7 +13169,8 @@ void Unit::RemoveCharmedOrPossessedBy(Unit *charmer)
}
//a guardian should always have charminfo
- if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT && !((Creature*)this)->HasSummonMask(SUMMON_MASK_GUARDIAN))
+ if(GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT
+ && !((Creature*)this)->HasSummonMask(SUMMON_MASK_GUARDIAN) && !((Creature*)this)->isPet())
{
DeleteCharmInfo();
}