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
This commit is contained in:
Trista committed 2012-12-27 01:35:38 +02:00
1 parent fd25bdd4b6
commit 452e585f7b
4 files changed
+8 -6

No files matched your search

+2 -1
View File
@@ -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;
}