Ejemplo n.º 1
0
        void SummonedCreatureDespawn(Creature *summon)
        {
            uint32 phase= summon->GetPhaseMask();
            uint32 nextPhase = 0;
            Summons.Despawn(summon);

            // Check if all summons in this phase killed
            for (SummonList::const_iterator iter = Summons.begin(); iter != Summons.end(); ++iter)
            {
                if (Creature *visage = Unit::GetCreature(*me, *iter))
                {
                    // Not all are dead
                    if (phase == visage->GetPhaseMask())
                        return;
                    else
                        nextPhase = visage->GetPhaseMask();
                }
            }

            // Roll Insanity
            uint32 spell = GetSpellForPhaseMask(phase);
            uint32 spell2 = GetSpellForPhaseMask(nextPhase);
            Map* pMap = me->GetMap();
            if (!pMap)
                return;

            Map::PlayerList const &PlayerList = pMap->GetPlayers();
            if (!PlayerList.isEmpty())
            {
                for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
                {
                    if (Player* pPlayer = i->getSource())
                    {
                        if (pPlayer->HasAura(spell))
                        {
                            pPlayer->RemoveAurasDueToSpell(spell);
                            if (spell2) // if there is still some different mask cast spell for it
                                pPlayer->CastSpell(pPlayer, spell2, true);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 void SummonedCreatureDespawn(Creature* pSummoned) {
     switch (pSummoned->GetEntry()) {
     case NPC_LIGHT_ESSENCE:
     case NPC_DARK_ESSENCE:
         Map* pMap = me->GetMap();
         Map::PlayerList const &lPlayers = pMap->GetPlayers();
         for (Map::PlayerList::const_iterator itr = lPlayers.begin();
                 itr != lPlayers.end(); ++itr) {
             Unit* pPlayer = itr->getSource();
             if (!pPlayer)
                 continue;
             if (pPlayer->isAlive())
                 if (pSummoned->GetEntry() == NPC_LIGHT_ESSENCE)
                     pPlayer->RemoveAurasDueToSpell(SPELL_LIGHT_ESSENCE);
             if (pSummoned->GetEntry() == NPC_DARK_ESSENCE)
                 pPlayer->RemoveAurasDueToSpell(SPELL_DARK_ESSENCE);
         }
         break;
     }
     Summons.Despawn(pSummoned);
 }
        void SummonedCreatureDespawn(Creature* summon) override
        {
            uint32 nextPhase = 0;
            Summons.Despawn(summon);

            // Check if all summons in this phase killed
            for (SummonList::const_iterator iter = Summons.begin(); iter != Summons.end(); ++iter)
            {
                if (Creature* visage = ObjectAccessor::GetCreature(*me, *iter))
                {
                    // Not all are dead
                    if (visage->IsInPhase(summon))
                        return;
                    else
                    {
                        nextPhase = *visage->GetPhases().begin();
                        break;
                    }
                }
            }

            // Roll Insanity
            Map* map = me->GetMap();
            if (!map)
                return;

            Map::PlayerList const &PlayerList = map->GetPlayers();
            if (!PlayerList.isEmpty())
            {
                for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
                {
                    if (Player* player = i->GetSource())
                    {
                        for (uint32 index = 0; index <= 4; ++index)
                            player->RemoveAurasDueToSpell(SPELL_INSANITY_TARGET + index);
                        player->CastSpell(player, SPELL_INSANITY_TARGET + nextPhase - 173, true);
                    }
                }
            }
        }
Ejemplo n.º 4
0
 void SummonedCreatureDespawn(Creature* summon)
 {
     if (summon->GetEntry() == NPC_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
         summons.Despawn(summon);
 }
Ejemplo n.º 5
0
		void SummonedCreatureDespawn(Creature* creature)
		{
			summons.Despawn(creature);
		}
Ejemplo n.º 6
0
 void SummonedMobDied(Creature *pSummoned)
 {
     listOfMobs.Despawn(pSummoned);
     if (pSummoned)
         pInstance->SetData64(DATA_DELETE_TRASH_MOB, pSummoned->GetGUID());
 }
Ejemplo n.º 7
0
 void SummonedCreatureDespawn(Creature* pSummoned)
 {
     if (pSummoned->GetEntry() == CREATURE_GRAUF)
         m_uiGraufGUID = 0;
     Summons.Despawn(pSummoned);
 }
Ejemplo n.º 8
0
 void SummonedCreatureDespawn(Creature* pSummoned)
 {
     Summons.Despawn(pSummoned);
     --KillCount;
 }
Ejemplo n.º 9
0
 void SummonedCreatureDespawn(Creature* summoned)
 {
     if (summoned->GetEntry() == NPC_SPARK_OF_IONAR)
         lSparkList.Despawn(summoned);
 }
Ejemplo n.º 10
0
 void SummonedCreatureDies(Creature* summoned, Unit* /*who*/) override
 {
     Summons.Despawn(summoned);
     ++KillCount;
 }
Ejemplo n.º 11
0
 void SummonedCreatureDespawn(Creature* summoned)
 {
     Summons.Despawn(summoned);
 }
Ejemplo n.º 12
0
			void SummonedCreatureDies(Creature* cr, Unit*)
			{
				summons.Despawn(cr);
				events.ScheduleEvent(EVENT_SUMMON_NEXT_MINION, 4000);
			}
Ejemplo n.º 13
0
 void SummonedCreatureDies(Creature* summoned, Unit* /*killer*/) override
 {
     listOfMobs.Despawn(summoned);
     instance->SetGuidData(DATA_DEL_TRASH_MOB, summoned->GetGUID());
 }
Ejemplo n.º 14
0
 void SummonedCreatureDespawn(Creature* summon)
 {
     if (summon->GetEntry() == NPC_BROKEN)
         summons.Despawn(summon);
 }
Ejemplo n.º 15
0
 void SummonedMobDied(Creature* summoned)
 {
     listOfMobs.Despawn(summoned);
     if (summoned)
         instance->SetData64(DATA_DEL_TRASH_MOB, summoned->GetGUID());
 }
 void SummonedCreatureDespawn(Creature* summon) override
 {
     Summons.Despawn(summon);
 }
 void SummonedCreatureDespawn(Creature* summoned) override
 {
     Summons.Despawn(summoned);
     --KillCount;
 }
Ejemplo n.º 18
0
 void SummonedCreatureDespawn(Creature* summoned) override
 {
     if (summoned->GetEntry() == NPC_GRAUF)
         m_uiGraufGUID.Clear();
     Summons.Despawn(summoned);
 }
Ejemplo n.º 19
0
		void SummonedCreatureDies(Creature* summon, Unit*)
		{
			summons.Despawn(summon);
			if (events.GetPhaseMask() & 0x01)
				events.ScheduleEvent(EVENT_RESTORE_COMBAT, 0);
		}
Ejemplo n.º 20
0
 void SummonedCreatureDies(Creature* creature, Unit*)
 {
     summons.Despawn(creature);
     if (summons.empty())
         Talk(textCounter++, GetPlayerForEscort());
 }
Ejemplo n.º 21
0
 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
 {
     summons.Despawn(summon);
     summon->SetCorpseDelay(5*IN_MILLISECONDS);
 }
Ejemplo n.º 22
0
 void SummonedCreatureDespawn(Creature* summoned)
 {
     Summons.Despawn(summoned);
     ++KillCount;
 }
 void SummonedCreatureDies(Creature* summon, Unit*)
 {
     summons.Despawn(summon);
     for (uint8 i = 0; i < 3; ++i)
         me->CastSpell(me, SPELL_SUMMON_SPORE_STRIDER, false);
 }
Ejemplo n.º 24
0
 void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);}
Ejemplo n.º 25
0
 void SummonedCreatureDespawn(Creature *pSummoned) 
 {
     summons.Despawn(pSummoned);
 }