From 452e585f7b4b2bc349d7386b0c42cf296f0ab4c2 Mon Sep 17 00:00:00 2001 From: Trista Date: Thu, 27 Dec 2012 01:28:23 +0200 Subject: Core/Vehicles: Fixed seat id for auras with SPELL_AURA_CONTROL_VEHICLE. Also always allow npc passengers to cast spells and remove TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE hacks. * Author: Horn. Please give feedback, I tested a lot stuff, but it will be appreciated. * One of the fixes allow all creatures to cast when being passangers, researched, this doesn't involve players. * This basically rewrittes vehicle seat formula calculated, so it fix quite stuff that will not be visible and some eye candies: #3831 and #1984 Heart part ;) (which magically fix a lot more of it and some quests), also Yog-Sarron mechanics --- src/server/game/Spells/Spell.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 3cee51949bc..1ca04747101 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4853,9 +4853,10 @@ SpellCastResult Spell::CheckCast(bool strict) if (!checkMask) checkMask = VEHICLE_SEAT_FLAG_CAN_ATTACK; + // All creatures should be able to cast as passengers freely, restriction and attribute are only for players VehicleSeatEntry const* vehicleSeat = vehicle->GetSeatForPassenger(m_caster); if (!(m_spellInfo->AttributesEx6 & SPELL_ATTR6_CASTABLE_WHILE_ON_VEHICLE) && !(m_spellInfo->Attributes & SPELL_ATTR0_CASTABLE_WHILE_MOUNTED) - && (vehicleSeat->m_flags & checkMask) != checkMask) + && (vehicleSeat->m_flags & checkMask) != checkMask && m_caster->GetTypeId() == TYPEID_PLAYER) return SPELL_FAILED_DONT_REPORT; } -- cgit v1.2.3