diff options
author | Trista <aconstantgoal@abv.bg> | 2012-12-27 01:28:23 +0200 |
---|---|---|
committer | Trista <aconstantgoal@abv.bg> | 2012-12-27 01:35:38 +0200 |
commit | 452e585f7b4b2bc349d7386b0c42cf296f0ab4c2 (patch) | |
tree | b82146c1756e5899f49e9bb7eb7cf4609ce96f12 /src/server/game/Spells/Spell.cpp | |
parent | fd25bdd4b63adb2b72587dfae48b256a51c638d8 (diff) |
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
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |