Example #1
0
    void Reset()
    {
        m_creature->Relocate(2642.2,-3388.39,285.6); 
       (*m_creature).GetMotionMaster()->MoveTargetedHome();
        InCombat = false;
        phase1end_timer = 24000; 
        teleport_timer = 20000;//test
        harvestsouls_timer = 5000;//test
        shadowbolt_timer = 7500;//test
        phase = -1;    
        pos = -1; // teleport possition .. -1 Start , 0 life , 1 death
        spawn_trainee = 27000;
        spawn_deathknight = 77000;
        spawn_rider = 137000; 	

        m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
		if(pInstance)
		{
			pInstance->SetData(ENCOUNT_GOTHIK, 0);
			HandleDoors(GO_VACCUUM_EXIT, 1);
			HandleDoors(GO_VACCUUM_COMBAT, 0);
			HandleDoors(GO_DEATHKNIGHT_DOOR, 1);
            Unit *temp = Unit::GetUnit((*m_creature),pInstance->GetData64(GUID_RAZUVIOUS));
			if(temp && temp->isDead())
			    HandleDoors(GO_VACCUUM_ENTER, 0);
		}
    }
Example #2
0
 void JustDied(Unit* Killer)
 {
     if (pInstance)
     {
         pInstance->SetData(ENCOUNT_GLUTH, 2);
         HandleDoors(GO_GLUTH_EXIT, 0);
         Unit *temp = Unit::GetUnit((*m_creature),pInstance->GetData64(GUID_PATCHWERK));
         if (temp && temp->isDead())
             HandleDoors(GO_THADDIUS_DOOR, 0);
     }
 }
Example #3
0
    void JustDied(Unit* Killer)
    {
        DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL);
        DoPlaySoundToSet(m_creature, SOUND_DEATH);
        if(pInstance)
        {
            pInstance->SetData(ENCOUNT_PATCHWERK, 2);
            HandleDoors(GO_PATCHWORK_EXIT, 0);
            Unit *temp = Unit::GetUnit((*m_creature),pInstance->GetData64(GUID_GLUTH));
            if (temp && temp->isDead())
                HandleDoors(GO_THADDIUS_DOOR, 0);
        }

    }
Example #4
0
    void Aggro(Unit *who)
    {
        if (!InCombat)
        {
            DoZoneInCombat(m_creature);
            InCombat = true;
            DoYell(SAY_START,LANG_UNIVERSAL,NULL);
            DoPlaySoundToSet(m_creature,SOUND_START);
            phase = 0; 
			phase1end_timer = 24000;  
            //m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
            HandleDoors(GO_VACCUUM_ENTER, GO_STATE_READY);
            HandleDoors(GO_VACCUUM_COMBAT, 1);
        }
    }
Example #5
0
 void JustDied(Unit* killer)
 {
     HandleDoors(true);
     DestroyPortals();
     if (pInstance)
         pInstance->SetData(DATA_NETHERSPITE_EVENT, DONE);
 }
        void Reset() override
        {
            Initialize();

            HandleDoors(true);
            DestroyPortals();
        }
		void Reset() {
			Berserk = false;
			NetherInfusionTimer = 540000;
			VoidZoneTimer = 15000;
			NetherbreathTimer = 3000;

			HandleDoors(true);
			DestroyPortals();
		}
Example #8
0
    void EnterCombat(Unit *who)
    {
        HandleDoors(false);
        SwitchToPortalPhase();

        m_creature->GetMotionMaster()->Clear();
        DoStartMovement(who);

        if (pInstance)
            pInstance->SetData(DATA_NETHERSPITE_EVENT, IN_PROGRESS);
    }
Example #9
0
    void Reset()
    {
        ClearCastQueue();

        Berserk = false;
        NetherInfusionTimer = 540000;
        VoidZoneTimer = 15000;
        NetherbreathTimer = 3000;
        ExhaustCheckTimer = 1000;
        HandleDoors(true);
        DestroyPortals();

        for(int i=0; i<3; ++i)
        {
            PortalGUID[i] = 0;
            BeamTarget[i] = 0;
            BeamerGUID[i] = 0;
        }

        m_creature->GetMotionMaster()->MovePath(NETHER_PATROL_PATH, true);

        if(pInstance && pInstance->GetData(DATA_NETHERSPITE_EVENT) != DONE)
            pInstance->SetData(DATA_NETHERSPITE_EVENT, NOT_STARTED);
    }
Example #10
0
 void JustDied(Unit* /*killer*/)
 {
     HandleDoors(true);
     DestroyPortals();
 }
Example #11
0
 void EnterCombat(Unit* /*who*/)
 {
     HandleDoors(false);
     SwitchToPortalPhase();
 }
Example #12
0
 void Aggro(Unit *who)
 {
     HandleDoors(false);
     SwitchToPortalPhase();
 }
Example #13
0
    void UpdateAI(const uint32 diff)
    {
        if(phase == 0)
        {
            if(phase1end_timer < diff)
            {
                switch(rand()%2)
                {
                case 0:
                    DoYell("Foolishly you have sought your own demise.",LANG_UNIVERSAL,NULL);
                    break;
                case 1:
                    DoYell("Teamanare shi rikk mannor rikk lok karkun",LANG_UNIVERSAL,NULL);
                    break;
                }
                phase = 1;
                phase1end_timer = 274000;
                if(pInstance)
			    {
				    pInstance->SetData(ENCOUNT_GOTHIK, 1);				    
				    HandleDoors(GO_VACCUUM_EXIT, 1);				    
			    }  

            }else phase1end_timer -=diff;

        }

        if(phase == 1)
        {
            Unit* target; 
            Creature* summon;
            if(phase1end_timer < diff)
            {
                DoYell(SAY_TELEPORT,LANG_UNIVERSAL,NULL);
                DoPlaySoundToSet(m_creature,SOUND_TELEPORT);
                phase = 2;
                pos = 0;
                //teleport to life side
                m_creature->Relocate(teleport_spots[pos][0],teleport_spots[pos][1],teleport_spots[pos][2]);
                m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
				HandleDoors(GO_VACCUUM_COMBAT, 0);
            }else
            {   
                if (!m_creature->getVictim())
                    m_creature->AI()->EnterEvadeMode();
                phase1end_timer -=diff;
            }
              
            if(spawn_trainee < diff)
            {
                
                for(int i=0;i<=2;i++)
                {
                    summon = m_creature->SummonCreature(MOB_UNRELENTING_TRAINEE,lifeside_spawn[i][0],lifeside_spawn[i][1],lifeside_spawn[i][2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,15000);                                        
                    target = SelectUnit(SELECT_TARGET_RANDOM,0);
                    summon->getThreatManager().addThreat(target,0.0f);
                    
                }
                spawn_trainee = 20000;
            }else spawn_trainee -=diff;

            if(spawn_deathknight < diff)
            {
                summon = m_creature->SummonCreature(MOB_UNRELENTING_DEATHKNIGHT,lifeside_spawn[0][0],lifeside_spawn[0][1],lifeside_spawn[0][2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,15000);
                target = SelectUnit(SELECT_TARGET_RANDOM,0);
                summon->getThreatManager().addThreat(target,0.0f);
                summon = m_creature->SummonCreature(MOB_UNRELENTING_DEATHKNIGHT,lifeside_spawn[2][0],lifeside_spawn[2][1],lifeside_spawn[2][2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,15000);
                target = SelectUnit(SELECT_TARGET_RANDOM,0);
                summon->getThreatManager().addThreat(target,0.0f);
                spawn_deathknight = 25000;
            }else spawn_deathknight -=diff;

            if(spawn_rider < diff)
            {
                summon = m_creature->SummonCreature(MOB_UNRELENTING_RIDER,lifeside_spawn[1][0],lifeside_spawn[1][1],lifeside_spawn[1][2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,15000);   
                target = SelectUnit(SELECT_TARGET_RANDOM,0);
                summon->getThreatManager().addThreat(target,0.0f);
                spawn_rider = 30000;
            } else spawn_rider -=diff;
        }

        if(phase == 2)
        {
            if (m_creature->getVictim())
            {
                if(teleport_timer < diff)
                {
                    if(pos == 1)
                        pos = 0;
                    else pos = 1;
                    m_creature->Relocate(teleport_spots[pos][0],teleport_spots[pos][1],teleport_spots[pos][2]);
                    teleport_timer = 20000;
                }else 
                {   
                    if (!m_creature->getVictim())
                        m_creature->AI()->EnterEvadeMode();
                    teleport_timer  -= diff;
                }
         
                if(harvestsouls_timer < diff) 
                {          
                    Unit* target = NULL;

                    target = SelectUnit(SELECT_TARGET_RANDOM,0);
                    if (target)DoCast(target,SPELL_HARVESTSOUL);
                    harvestsouls_timer = 5000;

                }else harvestsouls_timer -= diff;

                if(shadowbolt_timer < diff) 
                {          
                    Unit* target = NULL;

                    target = SelectUnit(SELECT_TARGET_RANDOM,0);
                    if (target)DoCast(target,SPELL_SHADOWBOLT);
                    shadowbolt_timer = 3000;
                }else shadowbolt_timer -= diff;        
            }

        };
    }