Пример #1
0
    void UpdateAI(const uint32 diff)
    {
        // we're still doing awaken animation
        if (wakingUp && Awaken_Timer >= 0) {
            Awaken_Timer -= diff;
            return;        // dont do anything until we are done
        } else if (wakingUp && Awaken_Timer <= 0) {
            wakingUp = false;
            AttackStart(Unit::GetUnit(*m_creature, pInstance->GetData64(0)));
            return;     // dont want to continue until we finish the AttackStart method
        }

        //Return since we have no target
        if (!UpdateVictim())
            return;


        // wake a wall minion
        if (WallMinionTimer < diff) {
            pInstance->SetData (NULL, 2);

            WallMinionTimer = 10000;
        } else WallMinionTimer -= diff;

        //If we are <66 summon the guardians
        if ( !guardiansAwake && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 66) {
            ActivateMinion(pInstance->GetData64(5),true);   // EarthenGuardian1
            ActivateMinion(pInstance->GetData64(6),true);   // EarthenGuardian2
            ActivateMinion(pInstance->GetData64(7),true);   // EarthenGuardian3
            ActivateMinion(pInstance->GetData64(8),true);   // EarthenGuardian4
            ActivateMinion(pInstance->GetData64(9),true);   // EarthenGuardian5
            ActivateMinion(pInstance->GetData64(10),false); // EarthenGuardian6
            DoYell(SAY_SUMMON,LANG_UNIVERSAL, NULL);
            DoPlaySoundToSet(m_creature, SOUND_SUMMON);
            guardiansAwake = true;
        }

        //If we are <33 summon the vault walkers
        if ( !vaultWalkersAwake && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 33) {
            ActivateMinion(pInstance->GetData64(1),true);    // VaultWalker1
            ActivateMinion(pInstance->GetData64(2),true);    // VaultWalker2
            ActivateMinion(pInstance->GetData64(3),true);    // VaultWalker3
            ActivateMinion(pInstance->GetData64(4),false);    // VaultWalker4
            DoYell(SAY_SUMMON2, LANG_UNIVERSAL, NULL);
            DoPlaySoundToSet(m_creature, SOUND_SUMMON2);
            vaultWalkersAwake = true;
        }


        if (Tremor_Timer < diff)
        {
            //Cast
            DoCast(m_creature->getVictim(),SPELL_GROUND_TREMOR);

            //45 seconds until we should cast this agian
            Tremor_Timer  = 45000;
        }else Tremor_Timer  -= diff;

        DoMeleeAttackIfReady();
    }
Пример #2
0
		void UpdateAI(const uint32 uiDiff) {
			if (!pInstance)
				return;
			// we're still doing awaken animation
			if (bWakingUp && iAwakenTimer >= 0) {
				iAwakenTimer -= uiDiff;
				return; // dont do anything until we are done
			} else if (bWakingUp && iAwakenTimer <= 0) {
				bWakingUp = false;
				AttackStart(Unit::GetUnit(*me, pInstance->GetData64(0)));
				return; // dont want to continue until we finish the AttackStart method
			}

			//Return since we have no target
			if (!UpdateVictim())
				return;

			// wake a wall minion
			if (uiWallMinionTimer <= uiDiff) {
				pInstance->SetData(DATA_MINIONS, IN_PROGRESS);

				uiWallMinionTimer = 10000;
			} else
				uiWallMinionTimer -= uiDiff;

			//If we are <66 summon the guardians
			if (!bGuardiansAwake && !HealthAbovePct(66)) {
				ActivateMinion(pInstance->GetData64(5), true); // EarthenGuardian1
				ActivateMinion(pInstance->GetData64(6), true); // EarthenGuardian2
				ActivateMinion(pInstance->GetData64(7), true); // EarthenGuardian3
				ActivateMinion(pInstance->GetData64(8), true); // EarthenGuardian4
				ActivateMinion(pInstance->GetData64(9), true); // EarthenGuardian5
				ActivateMinion(pInstance->GetData64(10), false); // EarthenGuardian6
				me->MonsterYell(SAY_SUMMON, LANG_UNIVERSAL, NULL);
				DoPlaySoundToSet(me, SOUND_SUMMON);
				bGuardiansAwake = true;
			}

			//If we are <33 summon the vault walkers
			if (!bVaultWalkersAwake && !HealthAbovePct(33)) {
				ActivateMinion(pInstance->GetData64(1), true); // VaultWalker1
				ActivateMinion(pInstance->GetData64(2), true); // VaultWalker2
				ActivateMinion(pInstance->GetData64(3), true); // VaultWalker3
				ActivateMinion(pInstance->GetData64(4), false); // VaultWalker4
				me->MonsterYell(SAY_SUMMON2, LANG_UNIVERSAL, NULL);
				DoPlaySoundToSet(me, SOUND_SUMMON2);
				bVaultWalkersAwake = true;
			}

			if (uiTremorTimer <= uiDiff) {
				//Cast
				DoCast(me->getVictim(), SPELL_GROUND_TREMOR);

				//45 seconds until we should cast this agian
				uiTremorTimer = 45000;
			} else
				uiTremorTimer -= uiDiff;

			DoMeleeAttackIfReady();
		}
Пример #3
0
            void UpdateAI(uint32 uiDiff) override
            {
                // we're still doing awaken animation
                if (bWakingUp && iAwakenTimer >= 0)
                {
                    iAwakenTimer -= uiDiff;
                    return;        // dont do anything until we are done
                } else if (bWakingUp && iAwakenTimer <= 0)
                {
                    bWakingUp = false;
                    AttackStart(ObjectAccessor::GetUnit(*me, instance->GetData64(0)));
                    return;     // dont want to continue until we finish the AttackStart method
                }

                //Return since we have no target
                if (!UpdateVictim())
                    return;

                // wake a wall minion
                if (uiWallMinionTimer <= uiDiff)
                {
                    instance->SetData(DATA_MINIONS, IN_PROGRESS);

                    uiWallMinionTimer = 10000;
                } else uiWallMinionTimer -= uiDiff;

                //If we are <66 summon the guardians
                if (!bGuardiansAwake && !HealthAbovePct(66))
                {
                    ActivateMinion(instance->GetData64(5), true);   // EarthenGuardian1
                    ActivateMinion(instance->GetData64(6), true);   // EarthenGuardian2
                    ActivateMinion(instance->GetData64(7), true);   // EarthenGuardian3
                    ActivateMinion(instance->GetData64(8), true);   // EarthenGuardian4
                    ActivateMinion(instance->GetData64(9), true);   // EarthenGuardian5
                    ActivateMinion(instance->GetData64(10), false); // EarthenGuardian6
                    Talk(SAY_SUMMON_GUARDIANS);
                    bGuardiansAwake = true;
                }

                //If we are <33 summon the vault walkers
                if (!bVaultWalkersAwake && !HealthAbovePct(33))
                {
                    ActivateMinion(instance->GetData64(1), true);    // VaultWalker1
                    ActivateMinion(instance->GetData64(2), true);    // VaultWalker2
                    ActivateMinion(instance->GetData64(3), true);    // VaultWalker3
                    ActivateMinion(instance->GetData64(4), false);    // VaultWalker4
                    Talk(SAY_SUMMON_VAULT_WALKERS);
                    bVaultWalkersAwake = true;
                }

                if (uiTremorTimer <= uiDiff)
                {
                    //Cast
                    DoCastVictim(SPELL_GROUND_TREMOR);

                    //45 seconds until we should cast this agian
                    uiTremorTimer  = 45000;
                } else uiTremorTimer  -= uiDiff;

                DoMeleeAttackIfReady();
            }