mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19: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
|
bool Creature::IsOutOfThreatArea(Unit* pVictim) const
|
||||||
{
|
{
|
||||||
if(!pVictim)
|
if (!pVictim)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(!pVictim->IsInMap(this))
|
if (!pVictim->IsInMap(this))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(!pVictim->isTargetableForAttack())
|
if (!pVictim->isTargetableForAttack())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(!pVictim->isInAccessablePlaceFor(this))
|
if (!pVictim->isInAccessablePlaceFor(this))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!pVictim->isVisibleForOrDetect(this,this,false))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(sMapStore.LookupEntry(GetMapId())->IsDungeon())
|
if(sMapStore.LookupEntry(GetMapId())->IsDungeon())
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9158"
|
#define REVISION_NR "9159"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue