mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10298] Clear tavern rest when leaving building and prevent forced unmount when in GM mode.
This commit is contained in:
parent
af50d03f16
commit
28d1ac66c3
3 changed files with 19 additions and 17 deletions
|
|
@ -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()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue