[10298] Clear tavern rest when leaving building and prevent forced unmount when in GM mode.

This commit is contained in:
Lynx3d 2010-07-30 12:32:23 +02:00
parent af50d03f16
commit 28d1ac66c3
3 changed files with 19 additions and 17 deletions

View file

@ -4212,7 +4212,8 @@ SpellCastResult Spell::CheckCast(bool strict)
if(bg->GetStatus() == STATUS_WAIT_LEAVE)
return SPELL_FAILED_DONT_REPORT;
if(m_caster->GetTypeId() == TYPEID_PLAYER && VMAP::VMapFactory::createOrGetVMapManager()->isLineOfSightCalcEnabled())
if(m_caster->GetTypeId() == TYPEID_PLAYER && !((Player*)m_caster)->isGameMaster() &&
VMAP::VMapFactory::createOrGetVMapManager()->isLineOfSightCalcEnabled())
{
if(m_spellInfo->Attributes & SPELL_ATTR_OUTDOORS_ONLY &&
!m_caster->GetMap()->IsOutdoors(m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ()))