mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-01 16:37:45 +00:00
Friendly bnpcs no longer fight eachother
This commit is contained in:
parent
c19d4d4b25
commit
d978197b3d
2 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Add table
Reference in a new issue