diff --git a/src/map/latent_effect_container.cpp b/src/map/latent_effect_container.cpp index 38219946877..9eb35fd218c 100644 --- a/src/map/latent_effect_container.cpp +++ b/src/map/latent_effect_container.cpp @@ -718,25 +718,33 @@ bool CLatentEffectContainer::ProcessLatentEffect(CLatentEffect& latentEffect) case LATENT::SIGNET_BONUS: { CBattleEntity* PTarget = m_POwner->GetBattleTarget(); - expression = - PTarget != nullptr && m_POwner->GetMLevel() >= PTarget->GetMLevel() && m_POwner->loc.zone->GetRegionID() < REGION_TYPE::WEST_AHT_URHGAN; + expression = PTarget != nullptr && + m_POwner->GetMLevel() >= PTarget->GetMLevel() && + m_POwner->loc.zone != nullptr && + m_POwner->loc.zone->GetRegionID() < REGION_TYPE::WEST_AHT_URHGAN; break; } case LATENT::SANCTION_REGEN_BONUS: - expression = m_POwner->loc.zone->GetRegionID() >= REGION_TYPE::WEST_AHT_URHGAN && m_POwner->loc.zone->GetRegionID() <= REGION_TYPE::ALZADAAL && + expression = m_POwner->loc.zone != nullptr && + m_POwner->loc.zone->GetRegionID() >= REGION_TYPE::WEST_AHT_URHGAN && + m_POwner->loc.zone->GetRegionID() <= REGION_TYPE::ALZADAAL && ((float)m_POwner->health.hp / m_POwner->health.maxhp) * 100 < latentEffect.GetConditionsValue(); break; case LATENT::SANCTION_REFRESH_BONUS: - expression = m_POwner->loc.zone->GetRegionID() >= REGION_TYPE::WEST_AHT_URHGAN && m_POwner->loc.zone->GetRegionID() <= REGION_TYPE::ALZADAAL && + expression = m_POwner->loc.zone != nullptr && + m_POwner->loc.zone->GetRegionID() >= REGION_TYPE::WEST_AHT_URHGAN && + m_POwner->loc.zone->GetRegionID() <= REGION_TYPE::ALZADAAL && ((float)m_POwner->health.mp / m_POwner->health.maxmp) * 100 < latentEffect.GetConditionsValue(); break; case LATENT::SIGIL_REGEN_BONUS: - expression = m_POwner->loc.zone->GetRegionID() >= REGION_TYPE::RONFAURE_FRONT && + expression = m_POwner->loc.zone != nullptr && + m_POwner->loc.zone->GetRegionID() >= REGION_TYPE::RONFAURE_FRONT && m_POwner->loc.zone->GetRegionID() <= REGION_TYPE::VALDEAUNIA_FRONT && ((float)m_POwner->health.hp / m_POwner->health.maxhp) * 100 < latentEffect.GetConditionsValue(); break; case LATENT::SIGIL_REFRESH_BONUS: - expression = m_POwner->loc.zone->GetRegionID() >= REGION_TYPE::RONFAURE_FRONT && + expression = m_POwner->loc.zone != nullptr && + m_POwner->loc.zone->GetRegionID() >= REGION_TYPE::RONFAURE_FRONT && m_POwner->loc.zone->GetRegionID() <= REGION_TYPE::VALDEAUNIA_FRONT && ((float)m_POwner->health.mp / m_POwner->health.maxmp) * 100 < latentEffect.GetConditionsValue(); break;