mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8321] For additional atatck target ignore source spell target instaed auto-attack target.
This is fix targets selection in special cases for 13877, 26654 and ranks.
This commit is contained in:
parent
0d96fc06a6
commit
a1973ced28
3 changed files with 8 additions and 8 deletions
|
|
@ -4471,7 +4471,7 @@ bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
case 13877:
|
||||
case 33735:
|
||||
{
|
||||
target = SelectNearbyTarget();
|
||||
target = SelectNearbyTarget(pVictim);
|
||||
if(!target)
|
||||
return false;
|
||||
basepoints0 = damage;
|
||||
|
|
@ -4552,7 +4552,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
if(procSpell && procSpell->Id == 26654)
|
||||
return false;
|
||||
|
||||
target = SelectNearbyTarget();
|
||||
target = SelectNearbyTarget(pVictim);
|
||||
if(!target)
|
||||
return false;
|
||||
|
||||
|
|
@ -5083,7 +5083,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
if(procSpell && procSpell->Id == 26654)
|
||||
return false;
|
||||
|
||||
target = SelectNearbyTarget();
|
||||
target = SelectNearbyTarget(pVictim);
|
||||
if(!target)
|
||||
return false;
|
||||
|
||||
|
|
@ -11386,7 +11386,7 @@ void Unit::UpdateReactives( uint32 p_time )
|
|||
}
|
||||
}
|
||||
|
||||
Unit* Unit::SelectNearbyTarget() const
|
||||
Unit* Unit::SelectNearbyTarget(Unit* except /*= NULL*/) const
|
||||
{
|
||||
CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY()));
|
||||
Cell cell(p);
|
||||
|
|
@ -11408,8 +11408,8 @@ Unit* Unit::SelectNearbyTarget() const
|
|||
}
|
||||
|
||||
// remove current target
|
||||
if(getVictim())
|
||||
targets.remove(getVictim());
|
||||
if(except)
|
||||
targets.remove(except);
|
||||
|
||||
// remove not LoS targets
|
||||
for(std::list<Unit *>::iterator tIter = targets.begin(); tIter != targets.end();)
|
||||
|
|
|
|||
|
|
@ -919,7 +919,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
Unit* getVictim() const { return m_attacking; }
|
||||
void CombatStop(bool includingCast = false);
|
||||
void CombatStopWithPets(bool includingCast = false);
|
||||
Unit* SelectNearbyTarget() const;
|
||||
Unit* SelectNearbyTarget(Unit* except = NULL) const;
|
||||
bool hasNegativeAuraWithInterruptFlag(uint32 flag);
|
||||
void SendMeleeAttackStop(Unit* victim);
|
||||
void SendMeleeAttackStart(Unit* pVictim);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8320"
|
||||
#define REVISION_NR "8321"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue