aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellHandler.cpp
diff options
context:
space:
mode:
author_manuel_ <none@none>2009-12-31 17:59:56 -0300
committer_manuel_ <none@none>2009-12-31 17:59:56 -0300
commitebe7b299877aad8954bb5ab32d4046800c49b293 (patch)
treeecbd1b704d3261da65a424f091583c7c8943640f /src/game/SpellHandler.cpp
parent6cd8d1286f48671cd2e782b3a6803d7e951cb0f5 (diff)
Implemented function CheckPlayerCondition, it will be used before the player enters in vehicles. Now vehicles Argent Warhorse and Argent Battleworg can't be used if the player dosen't have Argent Lance eqquiped.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellHandler.cpp')
-rw-r--r--src/game/SpellHandler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp
index a9a28511d0c..6a03d13bf6d 100644
--- a/src/game/SpellHandler.cpp
+++ b/src/game/SpellHandler.cpp
@@ -556,7 +556,10 @@ void WorldSession::HandleSpellClick( WorldPacket & recv_data )
}
if(unit->IsVehicle())
- _player->EnterVehicle(unit);
+ {
+ if (unit->CheckPlayerCondition(_player))
+ _player->EnterVehicle(unit);
+ }
unit->AI()->DoAction(EVENT_SPELLCLICK);
}