aboutsummaryrefslogtreecommitdiff
path: root/src/game/MovementHandler.cpp
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-03-21 17:34:25 +0100
committerMachiavelli <none@none>2010-03-21 17:34:25 +0100
commit48051d1cd6e026c3b397e6719a61e16d1f8fa581 (patch)
treea4e5f6a6ea17bfb6358aa189a07b656434c744d5 /src/game/MovementHandler.cpp
parent450b2fba9db1df41613193f3f7bc7805bce23db3 (diff)
Add support field 'allowMount' to instance_template table (see http://trinitydatabase.org/index.php?/topic/14994-7656-instance-template/), this will define whether or not mounting is allowed in an instance, instead of defining it hard coded in the core.
--HG-- branch : trunk
Diffstat (limited to 'src/game/MovementHandler.cpp')
-rw-r--r--src/game/MovementHandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp
index 522b35219db..b29d0fc1c2c 100644
--- a/src/game/MovementHandler.cpp
+++ b/src/game/MovementHandler.cpp
@@ -149,6 +149,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
}
}
+ bool allowMount = !mEntry->IsDungeon();
if (mInstance)
{
Difficulty diff = GetPlayer()->GetDifficulty(mEntry->IsRaid());
@@ -156,7 +157,6 @@ void WorldSession::HandleMoveWorldportAckOpcode()
{
if (mapDiff->resetTime)
{
-
if (uint32 timeReset = sInstanceSaveManager.GetResetTimeFor(mEntry->MapID,diff))
{
uint32 timeleft = timeReset - time(NULL);
@@ -164,10 +164,11 @@ void WorldSession::HandleMoveWorldportAckOpcode()
}
}
}
+ allowMount = mInstance->allowMount;
}
// mount allow check
- if(!mEntry->IsMountAllowed())
+ if (!allowMount)
_player->RemoveAurasByType(SPELL_AURA_MOUNTED);
// update zone immediately, otherwise leave channel will cause crash in mtmap