void AIUpdate()
		{
			if(IsTimerFinished(mClearHateList))
			{
				ClearHateList();
				AggroRandomUnit();
				ResetTimer(mClearHateList, 15000);
			};

			ParentClass::AIUpdate();
		};
        void AIUpdate()
        {
            SpellDesc* pShield = FindSpellById(OMOR_DEMONIC_SHIELD);
            if (GetHealthPercent() <= 20 && pShield != NULL && !pShield->mEnabled)
            {
                pShield->mEnabled = true;
            }

            Unit* pTarget = _unit->GetAIInterface()->getNextTarget();
            if (pTarget != NULL)
            {
                if (GetRangeToUnit(pTarget) > 10.0f)
                {
                    pTarget = GetBestPlayerTarget(TargetFilter_Closest);
                    if (pTarget != NULL)
                    {
                        if (GetRangeToUnit(pTarget) > 10.0f)
                        {
                            pTarget = NULL;
                        }
                        else
                        {
                            ClearHateList();
                            _unit->GetAIInterface()->AttackReaction(pTarget, 500);
                            _unit->GetAIInterface()->setNextTarget(pTarget);
                        }
                    }
                    else
                        return;
                }

                if (pTarget == NULL)
                {
                    SpellDesc* pWhip = FindSpellById(OMOR_SHADOW_WHIP);    // used for now
                    if (pWhip != NULL)
                    {
                        pWhip->mLastCastTime = 0;
                        CastSpellNowNoScheduling(pWhip);
                        return;
                    }
                }
            }

            ParentClass::AIUpdate();
            SetCanMove(false);
    }
	void AIUpdate()
	{
		_unit->Root();
		GetAllowMelee();
		SetBehavior(Behavior_Spell);

		phaseTester();

		switch (starter)
		{
		case 3:
			{
				_unit->CastSpell(_unit, dbcSpell.LookupEntry(35177), true);
			}break;
		case 16:
			{
				SetPhase(1);
				_unit->SetUInt64Value(UNIT_FIELD_FLAGS, ( true ) ? 0 : UNIT_FLAG_NOT_ATTACKABLE_9);
				_unit->GetAIInterface()->SetAllowedToEnterCombat(true);
				ShieldOrb1 = _unit->GetMapMgr()->GetInterface()->SpawnCreature(CN_SHIELD_ORB, 1678.00f, 610.00f, 48.00f, 0.00f, true, true, 0, 0);
				//BlueDragon = _unit->GetMapMgr()->GetInterface()->SpawnCreature(CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT, 1720.00f, 642.00f, 28.00f, 0.00f, true, true, 0, 0);
				phase = 2;
				starter++;
			}break;
		}

		if (starter > 0 && starter < 16)
			starter++;

		if (phase == 4)
		{
			switch (dtimmer)
			{
				case 2:
					{
						ArmageddonSpawn();
						dtimmer++;
					}break;
				case 10:
					{
						_unit->SendChatMessage(CHAT_MSG_MONSTER_YELL,LANG_UNIVERSAL,"Who can you trust?");
						_unit->PlaySoundToSet(12503);
						SinisterReflect();
						dtimmer++;
					}break;
				case 104:
				{
					SetPhase(2);
					ClearHateList();
					SetAllowMelee(true);
					_unit->Root();
					_unit->SetUInt64Value(UNIT_FIELD_FLAGS, ( false ) ? 0 : UNIT_FLAG_NOT_ATTACKABLE_9);
					_unit->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, SAY_KJ_DARKNESS1);
					_unit->PlaySoundToSet(SOUND_KJ_DARKNESS1);
					_unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, 407);
					dtimmer++;
					}break;
				case 112:
				{
					SetAllowMelee(true);
					BlueShild();
					dtimmer++;
				}break;
				case 120:
				{
					CastSpellOnTarget(_unit, Target_RandomPlayer, Darkness, true);
					_unit->Root();
					SetAllowMelee(true);
					dtimmer++;
					}break;
				case 122:
				{
					SetPhase(1);
					_unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
					_unit->SetUInt64Value(UNIT_FIELD_FLAGS, ( true ) ? 0 : UNIT_FLAG_NOT_ATTACKABLE_9);
					ClearHateList();
					dtimmer = 0;
					}break;
				default:
				{
					_unit->Root();
					dtimmer++;
				}break;
			}
		}

		if (phase == 5)
		{
			switch (dtimmer)
			{
				case 10:
				{
					SinisterReflect();
					dtimmer++;
				}break;
				case 54:
				{
					SetPhase(2);
					ClearHateList();
					SetAllowMelee(true);
					_unit->Root();
					_unit->SetUInt64Value(UNIT_FIELD_FLAGS, ( false ) ? 0 : UNIT_FLAG_NOT_ATTACKABLE_9);
					_unit->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, SAY_KJ_DARKNESS2);
					_unit->PlaySoundToSet(SOUND_KJ_DARKNESS2);
					_unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, 407);
					dtimmer++;
					}break;
				case 62:
				{
					BlueShild();
					SetAllowMelee(true);
					dtimmer++;
				}break;
				case 70:
				{
					CastSpellOnTarget(_unit, Target_RandomPlayer, Darkness, true);
					SetAllowMelee(true);
					_unit->Root();
					dtimmer++;
					}break;
				case 72:
				{
					SetPhase(1);
					_unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
					_unit->SetUInt64Value(UNIT_FIELD_FLAGS, ( true ) ? 0 : UNIT_FLAG_NOT_ATTACKABLE_9);
					ClearHateList();
					dtimmer = 0;
					}break;
				default:
				{
					SetAllowMelee(true);
					_unit->Root();
					dtimmer++;
				}break;
			}
		}
		ParentClass::AIUpdate();
	}