diff options
| author | megamage <none@none> | 2009-06-14 09:57:57 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-06-14 09:57:57 -0500 |
| commit | e192d8f39b85ef504762bcbbd5c13a9885510f6b (patch) | |
| tree | b140f635725436e284f3522bc34c93283c175055 /src/game/Spell.cpp | |
| parent | c6d242c2b6478797fe19897d54308e7ed8228874 (diff) | |
*Some work on vehicle.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
| -rw-r--r-- | src/game/Spell.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 115419245d0..99d568ee09a 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -48,6 +48,7 @@ #include "BattleGround.h" #include "Util.h" #include "TemporarySummon.h" +#include "Vehicle.h" #define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILISECONDS) @@ -1728,6 +1729,15 @@ void Spell::SetTargetMap(uint32 i, uint32 cur) case TARGET_UNIT_RAID_CASTER: pushType = PUSH_CASTER_CENTER; break; + case TARGET_UNIT_VEHICLE: + if(Vehicle *vehicle = m_caster->m_Vehicle) + AddUnitTarget(vehicle, i); + break; + case TARGET_UNIT_PASSENGER: + if(m_caster->GetTypeId() == TYPEID_UNIT && ((Creature*)m_caster)->isVehicle()) + if(Unit *unit = ((Vehicle*)m_caster)->GetPassenger(1)) // maybe not right + AddUnitTarget(unit, i); + break; } break; } |
