[11750] Implement npc spells 28096 and 28111

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Schmoozerd 2011-07-24 07:07:41 +04:00 committed by VladimirMangos
parent 7a24d7768b
commit b26a969e0d
2 changed files with 41 additions and 9 deletions

View file

@ -1243,14 +1243,46 @@ void Aura::TriggerSpell()
// case 27819: break;
// // Controller Timer
// case 28095: break;
// // Stalagg Chain
// case 28096: break;
// // Stalagg Tesla Passive
// case 28097: break;
// // Feugen Tesla Passive
// case 28109: break;
// // Feugen Chain
// case 28111: break;
// Stalagg Chain and Feugen Chain
case 28096:
case 28111:
{
// X-Chain is casted by Tesla to X, so: caster == Tesla, target = X
Unit* pCaster = GetCaster();
if (pCaster && pCaster->GetTypeId() == TYPEID_UNIT && !pCaster->IsWithinDistInMap(target, 60.0f))
{
pCaster->InterruptNonMeleeSpells(true);
((Creature*)pCaster)->SetInCombatWithZone();
// Stalagg Tesla Passive or Feugen Tesla Passive
pCaster->CastSpell(pCaster, auraId == 28096 ? 28097 : 28109, true, NULL, NULL, target->GetObjectGuid());
}
return;
}
// Stalagg Tesla Passive and Feugen Tesla Passive
case 28097:
case 28109:
{
// X-Tesla-Passive is casted by Tesla on Tesla with original caster X, so: caster = X, target = Tesla
Unit* pCaster = GetCaster();
if (pCaster && pCaster->GetTypeId() == TYPEID_UNIT)
{
if (pCaster->getVictim() && !pCaster->IsWithinDistInMap(target, 60.0f))
{
if (Unit* pTarget = ((Creature*)pCaster)->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
target->CastSpell(pTarget, 28099, false);// Shock
}
else
{
// "Evade"
target->RemoveAurasDueToSpell(auraId);
target->DeleteThreatList();
target->CombatStop(true);
// Recast chain (Stalagg Chain or Feugen Chain
target->CastSpell(pCaster, auraId == 28097 ? 28096 : 28111, false);
}
}
return;
}
// // Mark of Didier
// case 28114: break;
// // Communique Timer, camp

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11749"
#define REVISION_NR "11750"
#endif // __REVISION_NR_H__