diff --git a/src/world/Actor/BNpc.cpp b/src/world/Actor/BNpc.cpp index 3b022dc3..627cc8c8 100644 --- a/src/world/Actor/BNpc.cpp +++ b/src/world/Actor/BNpc.cpp @@ -830,6 +830,9 @@ void Sapphire::Entity::BNpc::checkAggro() return; } + if( getEnemyType() == 0 && pClosestChara->getAsBNpc()->getEnemyType() == 0 ) + return; + // will use this range if chara level is lower than bnpc, otherwise diminishing equation applies float range = 14.f; diff --git a/src/world/Script/ScriptMgr.cpp b/src/world/Script/ScriptMgr.cpp index 0d2e64a5..721451c8 100644 --- a/src/world/Script/ScriptMgr.cpp +++ b/src/world/Script/ScriptMgr.cpp @@ -207,7 +207,7 @@ bool Sapphire::Scripting::ScriptMgr::onTalk( Entity::Player& player, uint64_t ac // check if the actor is an eobj and call its script if we have one auto& teriMgr = Common::Service< World::Manager::TerritoryMgr >::ref(); auto zone = teriMgr.getTerritoryByGuId( player.getTerritoryId() ); - if( auto eobj = zone ? zone->getEObj( actorId ) : nullptr ) + if( auto eobj = zone ? zone->getEObj( static_cast< uint32_t >( actorId ) ) : nullptr ) { auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::EventObjectScript >( eobj->getObjectId() ); if( script )