diff --git a/src/world/Actor/BNpc.cpp b/src/world/Actor/BNpc.cpp index 9907f545..5a488b0e 100644 --- a/src/world/Actor/BNpc.cpp +++ b/src/world/Actor/BNpc.cpp @@ -161,6 +161,10 @@ Sapphire::Entity::BNpc::BNpc( uint32_t id, std::shared_ptr< Common::BNPCInstance calculateStats(); + if( m_bnpcType == BNpcType::Friendly ) + m_maxHp *= 5; + + max_hp = m_maxHp; } @@ -667,7 +671,7 @@ void Sapphire::Entity::BNpc::update( uint64_t tickCount ) auto distance = Util::distance( getPos().x, getPos().y, getPos().z, pHatedActor->getPos().x, pHatedActor->getPos().y, pHatedActor->getPos().z ); - if( !hasFlag( NoDeaggro ) && ( distanceOrig > maxDistanceToOrigin ) ) + if( !hasFlag( NoDeaggro ) && ( ( distanceOrig > maxDistanceToOrigin ) || distance > 30.0f ) ) { hateListClear(); changeTarget( INVALID_GAME_OBJECT_ID64 ); diff --git a/src/world/Actor/BNpc.h b/src/world/Actor/BNpc.h index 9078b97d..6e22c976 100644 --- a/src/world/Actor/BNpc.h +++ b/src/world/Actor/BNpc.h @@ -40,17 +40,18 @@ namespace Sapphire::Entity }; const std::array< uint32_t, 50 > BnpcBaseHp = - { 44,51, 59, 68, 91, - 108, 126, 143, 160, 192, - 217, 243, 268, 293, 319, - 344, 369, 394, 420, 413, - 458, 493, 532, 568, 594, - 641, 677,714, 750, 780, - 887, 965, 1055, 1142, 1220, - 1306, 1409, 1515, 1587, 1601, - 1703, 1789, 1872, 2008, 2112, - 2180, 2314, 2383, 2501, 2589 - }; + { + 44,51, 59, 68, 91, + 108, 126, 143, 160, 192, + 217, 243, 268, 293, 319, + 344, 369, 394, 420, 413, + 458, 493, 532, 568, 594, + 641, 677,714, 750, 780, + 887, 965, 1055, 1142, 1220, + 1306, 1409, 1515, 1587, 1601, + 1703, 1789, 1872, 2008, 2112, + 2180, 2314, 2383, 2501, 2589 + }; /*! \class BNpc