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);
                        }
                    }
                }
            }
        }
Beispiel #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);
                    }
                }
            }
        }
 void SummonedCreatureDespawn(Creature* summon)
 {
     if (summon->GetEntry() == NPC_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
         summons.Despawn(summon);
 }
Beispiel #5
0
		void SummonedCreatureDespawn(Creature* creature)
		{
			summons.Despawn(creature);
		}
 void SummonedMobDied(Creature *pSummoned)
 {
     listOfMobs.Despawn(pSummoned);
     if (pSummoned)
         pInstance->SetData64(DATA_DELETE_TRASH_MOB, pSummoned->GetGUID());
 }
Beispiel #7
0
 void SummonedCreatureDespawn(Creature* pSummoned)
 {
     if (pSummoned->GetEntry() == CREATURE_GRAUF)
         m_uiGraufGUID = 0;
     Summons.Despawn(pSummoned);
 }
 void SummonedCreatureDespawn(Creature* pSummoned)
 {
     Summons.Despawn(pSummoned);
     --KillCount;
 }
Beispiel #9
0
 void SummonedCreatureDespawn(Creature* summoned)
 {
     if (summoned->GetEntry() == NPC_SPARK_OF_IONAR)
         lSparkList.Despawn(summoned);
 }
 void SummonedCreatureDies(Creature* summoned, Unit* /*who*/) override
 {
     Summons.Despawn(summoned);
     ++KillCount;
 }
 void SummonedCreatureDespawn(Creature* summoned)
 {
     Summons.Despawn(summoned);
 }
Beispiel #12
0
			void SummonedCreatureDies(Creature* cr, Unit*)
			{
				summons.Despawn(cr);
				events.ScheduleEvent(EVENT_SUMMON_NEXT_MINION, 4000);
			}
Beispiel #13
0
 void SummonedCreatureDies(Creature* summoned, Unit* /*killer*/) override
 {
     listOfMobs.Despawn(summoned);
     instance->SetGuidData(DATA_DEL_TRASH_MOB, summoned->GetGUID());
 }
 void SummonedCreatureDespawn(Creature* summon)
 {
     if (summon->GetEntry() == NPC_BROKEN)
         summons.Despawn(summon);
 }
Beispiel #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;
 }
Beispiel #18
0
 void SummonedCreatureDespawn(Creature* summoned) override
 {
     if (summoned->GetEntry() == NPC_GRAUF)
         m_uiGraufGUID.Clear();
     Summons.Despawn(summoned);
 }
		void SummonedCreatureDies(Creature* summon, Unit*)
		{
			summons.Despawn(summon);
			if (events.GetPhaseMask() & 0x01)
				events.ScheduleEvent(EVENT_RESTORE_COMBAT, 0);
		}
Beispiel #20
0
 void SummonedCreatureDies(Creature* creature, Unit*)
 {
     summons.Despawn(creature);
     if (summons.empty())
         Talk(textCounter++, GetPlayerForEscort());
 }
 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
 {
     summons.Despawn(summon);
     summon->SetCorpseDelay(5*IN_MILLISECONDS);
 }
Beispiel #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);
 }
Beispiel #24
0
 void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);}
Beispiel #25
0
 void SummonedCreatureDespawn(Creature *pSummoned) 
 {
     summons.Despawn(pSummoned);
 }