void SpellFunc_ShazzrahBlinkArcaneExplosions(SpellDesc* pThis, AscentScriptCreatureAI* pCreatureAI, Unit* pTarget, TargetType pType) { ShazzrahAI* Shazzrah = ( pCreatureAI ) ? (ShazzrahAI*)pCreatureAI : NULL; if( Shazzrah ) { //Teleport blink, then cast 4 arcane explosions Shazzrah->CastSpell(Shazzrah->mBlink); for( int Iter = 0; Iter < 4; Iter++ ) Shazzrah->CastSpell(Shazzrah->mArcaneExplosion); } }
void SpellFunc_ShazzrahBlink(SpellDesc* pThis, MoonScriptCreatureAI* pCreatureAI, Unit* pTarget, TargetType pType) { ShazzrahAI* Shazzrah = ( pCreatureAI ) ? (ShazzrahAI*)pCreatureAI : NULL; if( Shazzrah ) { // Sloppy code is sloppy, but it works with no issues. Shazzrah->CastSpell(Shazzrah->mBlink); float PosX = pTarget->GetPositionX(); float PosY = pTarget->GetPositionY(); float PosZ = pTarget->GetPositionZ(); Shazzrah->GetUnit()->SetPosition(PosX, PosY, PosZ, 0, false); Shazzrah->CastSpell(Shazzrah->mArcaneExplosion); Shazzrah->ClearHateList(); Shazzrah->AggroNearestPlayer(); } };