mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[11695] Implement spell 24780 (switching target every 10s)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
26ccba0a8a
commit
d679c83884
2 changed files with 22 additions and 3 deletions
|
|
@ -1159,8 +1159,27 @@ void Aura::TriggerSpell()
|
|||
// case 24379: break;
|
||||
// // Happy Pet
|
||||
// case 24716: break;
|
||||
// // Dream Fog
|
||||
// case 24780: break;
|
||||
case 24780: // Dream Fog
|
||||
{
|
||||
// Note: In 1.12 triggered spell 24781 still exists, need to script dummy effect for this spell then
|
||||
// Select an unfriendly enemy in 100y range and attack it
|
||||
if (target->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
ThreatList const& tList = target->getThreatManager().getThreatList();
|
||||
for (ThreatList::const_iterator itr = tList.begin();itr != tList.end(); ++itr)
|
||||
{
|
||||
Unit* pUnit = target->GetMap()->GetUnit((*itr)->getUnitGuid());
|
||||
|
||||
if (pUnit && target->getThreatManager().getThreat(pUnit))
|
||||
target->getThreatManager().modifyThreatPercent(pUnit, -100);
|
||||
}
|
||||
|
||||
if (Unit* pEnemy = target->SelectRandomUnfriendlyTarget(target->getVictim(), 100.0f))
|
||||
((Creature*)target)->AI()->AttackStart(pEnemy);
|
||||
|
||||
return;
|
||||
}
|
||||
// // Cannon Prep
|
||||
// case 24832: break;
|
||||
case 24834: // Shadow Bolt Whirl
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11694"
|
||||
#define REVISION_NR "11695"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue