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
This commit is contained in:
Machiavelli
2010-03-21 17:34:25 +01:00
parent 450b2fba9d
commit 48051d1cd6
5 changed files with 7 additions and 14 deletions

View File

@@ -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