1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-25 19:17:45 +00:00

Deaggro on zone.

This commit is contained in:
Daniel Davies 2020-05-05 13:27:37 +01:00
parent 338504a9ea
commit dd3af7e689

View file

@ -494,6 +494,12 @@ void Sapphire::Entity::BNpc::update( uint64_t tickCount )
auto distanceOrig = Util::distance( getPos().x, getPos().y, getPos().z,
m_spawnPos.x, m_spawnPos.y, m_spawnPos.z );
if (pHatedActor && pHatedActor->getCurrentTerritory() != m_pCurrentTerritory )
{
hateListRemove( pHatedActor );
pHatedActor = hateListGetHighest();
}
if( pHatedActor && !pHatedActor->isAlive() )
{
hateListRemove( pHatedActor );