[11695] Implement spell 24780 (switching target every 10s)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Schmoozerd 2011-06-28 17:24:12 +04:00 committed by VladimirMangos
parent 26ccba0a8a
commit d679c83884
2 changed files with 22 additions and 3 deletions

View file

@ -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

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11694"
#define REVISION_NR "11695"
#endif // __REVISION_NR_H__