コード例 #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);
                        }
                    }
                }
            }
        }
コード例 #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);
 }
コード例 #3
0
        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);
                    }
                }
            }
        }
コード例 #4
0
 void SummonedCreatureDespawn(Creature* summon)
 {
     if (summon->GetEntry() == NPC_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
         summons.Despawn(summon);
 }
コード例 #5
0
ファイル: boss_rotface.cpp プロジェクト: InkVisible/wow
		void SummonedCreatureDespawn(Creature* creature)
		{
			summons.Despawn(creature);
		}
コード例 #6
0
 void SummonedMobDied(Creature *pSummoned)
 {
     listOfMobs.Despawn(pSummoned);
     if (pSummoned)
         pInstance->SetData64(DATA_DELETE_TRASH_MOB, pSummoned->GetGUID());
 }
コード例 #7
0
ファイル: boss_skadi.cpp プロジェクト: tauri/ArkCORE
 void SummonedCreatureDespawn(Creature* pSummoned)
 {
     if (pSummoned->GetEntry() == CREATURE_GRAUF)
         m_uiGraufGUID = 0;
     Summons.Despawn(pSummoned);
 }
コード例 #8
0
 void SummonedCreatureDespawn(Creature* pSummoned)
 {
     Summons.Despawn(pSummoned);
     --KillCount;
 }
コード例 #9
0
ファイル: boss_ionar.cpp プロジェクト: PavelDev/wodnetcore
 void SummonedCreatureDespawn(Creature* summoned)
 {
     if (summoned->GetEntry() == NPC_SPARK_OF_IONAR)
         lSparkList.Despawn(summoned);
 }
コード例 #10
0
 void SummonedCreatureDies(Creature* summoned, Unit* /*who*/) override
 {
     Summons.Despawn(summoned);
     ++KillCount;
 }
コード例 #11
0
 void SummonedCreatureDespawn(Creature* summoned)
 {
     Summons.Despawn(summoned);
 }
コード例 #12
0
ファイル: boss_emalon.cpp プロジェクト: AlexHjelm/sunwell
			void SummonedCreatureDies(Creature* cr, Unit*)
			{
				summons.Despawn(cr);
				events.ScheduleEvent(EVENT_SUMMON_NEXT_MINION, 4000);
			}
コード例 #13
0
ファイル: violet_hold.cpp プロジェクト: BackStap/TrinityCore
 void SummonedCreatureDies(Creature* summoned, Unit* /*killer*/) override
 {
     listOfMobs.Despawn(summoned);
     instance->SetGuidData(DATA_DEL_TRASH_MOB, summoned->GetGUID());
 }
コード例 #14
0
 void SummonedCreatureDespawn(Creature* summon)
 {
     if (summon->GetEntry() == NPC_BROKEN)
         summons.Despawn(summon);
 }
コード例 #15
0
ファイル: violet_hold.cpp プロジェクト: profPlum/TrinityCore
 void SummonedMobDied(Creature* summoned)
 {
     listOfMobs.Despawn(summoned);
     if (summoned)
         instance->SetData64(DATA_DEL_TRASH_MOB, summoned->GetGUID());
 }
コード例 #16
0
 void SummonedCreatureDespawn(Creature* summon) override
 {
     Summons.Despawn(summon);
 }
コード例 #17
0
 void SummonedCreatureDespawn(Creature* summoned) override
 {
     Summons.Despawn(summoned);
     --KillCount;
 }
コード例 #18
0
 void SummonedCreatureDespawn(Creature* summoned) override
 {
     if (summoned->GetEntry() == NPC_GRAUF)
         m_uiGraufGUID.Clear();
     Summons.Despawn(summoned);
 }
コード例 #19
0
		void SummonedCreatureDies(Creature* summon, Unit*)
		{
			summons.Despawn(summon);
			if (events.GetPhaseMask() & 0x01)
				events.ScheduleEvent(EVENT_RESTORE_COMBAT, 0);
		}
コード例 #20
0
ファイル: zone_westfall.cpp プロジェクト: AlexHjelm/sunwell
 void SummonedCreatureDies(Creature* creature, Unit*)
 {
     summons.Despawn(creature);
     if (summons.empty())
         Talk(textCounter++, GetPlayerForEscort());
 }
コード例 #21
0
 void SummonedCreatureDies(Creature* summon, Unit* /*killer*/)
 {
     summons.Despawn(summon);
     summon->SetCorpseDelay(5*IN_MILLISECONDS);
 }
コード例 #22
0
 void SummonedCreatureDespawn(Creature* summoned)
 {
     Summons.Despawn(summoned);
     ++KillCount;
 }
コード例 #23
0
 void SummonedCreatureDies(Creature* summon, Unit*)
 {
     summons.Despawn(summon);
     for (uint8 i = 0; i < 3; ++i)
         me->CastSpell(me, SPELL_SUMMON_SPORE_STRIDER, false);
 }
コード例 #24
0
ファイル: boss_supremus.cpp プロジェクト: Archives/ro_core
 void SummonedCreatureDespawn(Creature *summon) {summons.Despawn(summon);}
コード例 #25
0
ファイル: boss_the_lich_king.cpp プロジェクト: VenT/wow
 void SummonedCreatureDespawn(Creature *pSummoned) 
 {
     summons.Despawn(pSummoned);
 }