mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[9159] Skip invisible/stealthed and not detected targets from threat list at next target selection.
This will fix work spell 58984 and similar in combat.
This commit is contained in:
parent
2c092b1c34
commit
83261d9b9b
2 changed files with 8 additions and 5 deletions
|
|
@ -1607,16 +1607,19 @@ void Creature::SaveRespawnTime()
|
|||
|
||||
bool Creature::IsOutOfThreatArea(Unit* pVictim) const
|
||||
{
|
||||
if(!pVictim)
|
||||
if (!pVictim)
|
||||
return true;
|
||||
|
||||
if(!pVictim->IsInMap(this))
|
||||
if (!pVictim->IsInMap(this))
|
||||
return true;
|
||||
|
||||
if(!pVictim->isTargetableForAttack())
|
||||
if (!pVictim->isTargetableForAttack())
|
||||
return true;
|
||||
|
||||
if(!pVictim->isInAccessablePlaceFor(this))
|
||||
if (!pVictim->isInAccessablePlaceFor(this))
|
||||
return true;
|
||||
|
||||
if (!pVictim->isVisibleForOrDetect(this,this,false))
|
||||
return true;
|
||||
|
||||
if(sMapStore.LookupEntry(GetMapId())->IsDungeon())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue