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:
parent
338504a9ea
commit
dd3af7e689
1 changed files with 6 additions and 0 deletions
|
@ -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 );
|
||||
|
|
Loading…
Add table
Reference in a new issue