diff --git a/src/scripts/instances/questbattles/ChasingShadows.cpp b/src/scripts/instances/questbattles/ChasingShadows.cpp index 60f0702a..0dd97caa 100644 --- a/src/scripts/instances/questbattles/ChasingShadows.cpp +++ b/src/scripts/instances/questbattles/ChasingShadows.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include using namespace Sapphire; @@ -69,10 +69,8 @@ public: auto pPlayer = instance.getPlayerPtr(); a2->hateListAdd( pPlayer, 1 ); - pPlayer->hateListAdd( a2 ); a3->hateListAdd( pPlayer, 1 ); - pPlayer->hateListAdd( a3 ); } } @@ -116,15 +114,13 @@ public: a1->hateListAdd( a4, 10000 ); a1->hateListAdd( a5, 10000 ); + a2->hateListAdd( player.getAsPlayer(), 1 ); a2->hateListAdd( a4, 10000 ); a2->hateListAdd( a5, 10000 ); - a2->hateListAdd( player.getAsPlayer(), 1 ); - player.hateListAdd( a2 ); + a3->hateListAdd( player.getAsPlayer(), 1 ); a3->hateListAdd( a4, 10000 ); a3->hateListAdd( a5, 10000 ); - a3->hateListAdd( player.getAsPlayer(), 1 ); - player.hateListAdd( a3 ); a4->hateListAdd( a1, 10000 ); a4->hateListAdd( a2, 9999 ); @@ -137,4 +133,4 @@ public: }; -EXPOSE_SCRIPT( ChasingShadows ); \ No newline at end of file +EXPOSE_SCRIPT( ChasingShadows ); diff --git a/src/world/Actor/BNpc.cpp b/src/world/Actor/BNpc.cpp index 6d3684dd..fbb8003b 100644 --- a/src/world/Actor/BNpc.cpp +++ b/src/world/Actor/BNpc.cpp @@ -338,6 +338,11 @@ void Sapphire::Entity::BNpc::hateListAdd( Sapphire::Entity::CharaPtr pChara, int hateEntry->m_pChara = pChara; m_hateList.insert( hateEntry ); + if( pChara->isPlayer() ) + { + auto pPlayer = pChara->getAsPlayer(); + pPlayer->hateListAdd( getAsBNpc() ); + } } void Sapphire::Entity::BNpc::hateListUpdate( Sapphire::Entity::CharaPtr pChara, int32_t hateAmount ) @@ -705,4 +710,4 @@ void Sapphire::Entity::BNpc::setLevelId( uint32_t levelId ) uint32_t Sapphire::Entity::BNpc::getLevelId() const { return m_levelId; -} \ No newline at end of file +}