Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[11750] Implement npc spells 28096 and 28111

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information...
commit 886a96f6486b54bac0c3d553ba209ea7f229b434 1 parent dd4368d
@Schmoozerd Schmoozerd authored VladimirMangos committed
Showing with 41 additions and 9 deletions.
  1. +40 −8 src/game/SpellAuras.cpp
  2. +1 −1  src/shared/revision_nr.h
View
48 src/game/SpellAuras.cpp
@@ -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
2  src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "11749"
+ #define REVISION_NR "11750"
#endif // __REVISION_NR_H__
Please sign in to comment.
Something went wrong with that request. Please try again.