Exemple #1
0
void SpellFunc_Gruul_GroundSlam(SpellDesc* pThis, ArcTicScriptCreatureAI* pCreatureAI, Unit* pTarget, TargetType pType)
{
	GruulTheDragonkillerAI *pGruul = (pCreatureAI != NULL) ? (GruulTheDragonkillerAI*)pCreatureAI : NULL;
	if (pGruul != NULL)
	{
		pGruul->CastSpellNowNoScheduling(pGruul->mGroundSlam);
		pGruul->CastSpell(pGruul->mGroundSlam2);
		pGruul->CastSpell(pGruul->mStoned);
	}
}
Exemple #2
0
void SpellFunc_Gruul_Shatter(SpellDesc* pThis, ArcTicScriptCreatureAI* pCreatureAI, Unit* pTarget, TargetType pType)
{
	GruulTheDragonkillerAI *pGruul = (pCreatureAI != NULL) ? (GruulTheDragonkillerAI*)pCreatureAI : NULL;
	if (pGruul != NULL)
	{
		pGruul->CastSpell(pGruul->mShatter2);	// Spell to script
		UnitArray TargetArray = pGruul->GetInRangePlayers();
		if (TargetArray.size() > 0)
		{
			for (size_t i = 0; i < TargetArray.size(); ++i)
			{
				Unit* pTarget = TargetArray[i];
				pTarget->RemoveAura(GRUUL_THE_DRAGONKILLER_STONED);
			}
		}
	}
}
void SpellFunc_Gruul_Stoned(SpellDesc* pThis, MoonScriptCreatureAI* pCreatureAI, Unit* pTarget, TargetType pType)
{
    GruulTheDragonkillerAI* pGruul = (pCreatureAI != NULL) ? TO< GruulTheDragonkillerAI* >(pCreatureAI) : NULL;
    if (pGruul != NULL)
    {
        UnitArray TargetArray = pGruul->GetInRangePlayers();
        if (TargetArray.size() > 0)
        {
            for (size_t i = 0; i < TargetArray.size(); ++i)
            {
                Unit* pTarget = TargetArray[i];
                pTarget->CastSpell(pTarget, GRUUL_THE_DRAGONKILLER_STONED, true);
            }
        }

        pGruul->CastSpell(pGruul->mShatter);
    }
}