aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-14 19:33:20 -0600
committermegamage <none@none>2009-03-14 19:33:20 -0600
commitff60cf65a1f6a081bb8c24387ea56558484039a2 (patch)
treed96f0a932de6806c09e8204ae8aa1c19eaecae13
parentc416cf93992002dfe08fc9f1857f6715151a08e2 (diff)
*Autocast flight spells for vehicles as passive spells.
--HG-- branch : trunk
-rw-r--r--src/game/Player.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 0e4c90aa50c..441e09436ed 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -17382,7 +17382,14 @@ void Player::VehicleSpellInitialize()
for(uint32 i = 0; i < CREATURE_MAX_SPELLS; ++i)
{
uint32 spellId = ((Creature*)charm)->m_spells[i];
- if(IsPassiveSpell(spellId))
+ if(!spellId)
+ continue;
+
+ SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
+ if(!spellInfo)
+ continue;
+
+ if(IsPassiveSpell(spellId) || spellInfo->activeIconID == 2158) //flight
{
charm->CastSpell(charm, spellId, true);
data << uint16(0) << uint8(0) << uint8(i+8);