aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-14 09:57:57 -0500
committermegamage <none@none>2009-06-14 09:57:57 -0500
commite192d8f39b85ef504762bcbbd5c13a9885510f6b (patch)
treeb140f635725436e284f3522bc34c93283c175055 /src/game/Spell.cpp
parentc6d242c2b6478797fe19897d54308e7ed8228874 (diff)
*Some work on vehicle.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp10
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;
}