当前位置: 首页>>代码示例>>C++>>正文


C++ SummonList::end方法代码示例

本文整理汇总了C++中SummonList::end方法的典型用法代码示例。如果您正苦于以下问题:C++ SummonList::end方法的具体用法?C++ SummonList::end怎么用?C++ SummonList::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SummonList的用法示例。


在下文中一共展示了SummonList::end方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: JustReachedHome

            void JustReachedHome()
            {
                if (!me->isInCombat())
                {
                    for (int i = 0; i < 2; ++i)
                        if (Creature* totem = ObjectAccessor::GetCreature(*me, TotemGUID[i]))
                            totem->CastSpell(me, TotemSpell[i], false);
                }
                else
                {
                    for (SummonList::iterator itr = AcridTears.begin(); itr != AcridTears.end(); ++itr)
                    {
                        if (Creature* acrid = ObjectAccessor::GetCreature(*me, *itr))
                        {
                            acrid->CastSpell(acrid, 96634, false);
                            acrid->RemoveAllAuras();
                            acrid->DespawnOrUnsummon(2000);
                        }
                    }

                    Talk(SAY_BLOODVENOM);
                    Talk(EMOTE_BLOODVENOM);
                    me->CastSpell((Unit*)NULL, 96842, false);
                    events.ScheduleEvent(EVENT_VENOM_WITHDRAWAL, 15000);
                    events.ScheduleEvent(EVENT_SET_BLOODVENOM_PLAYER, 4000);
                }
            }
开发者ID:AtVirus,项目名称:Forgotten-Lands-Source,代码行数:27,代码来源:boss_venoxis.cpp

示例2: CheckPhaseMinions

		bool CheckPhaseMinions()
		{
			summons.RemoveNotExisting();
			if (summons.empty())
			{
				ResetPlayersPhaseMask();
                return true;
			}

			uint16 phase = 1;
			for (std::list<uint64>::iterator itr = summons.begin(); itr != summons.end(); ++itr)
			{
				if (Creature *summon = ObjectAccessor::GetCreature(*me, *itr))
					phase |= summon->GetPhaseMask();
			}

			Map::PlayerList const &players = me->GetMap()->GetPlayers();
            for (Map::PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
            {
                if (Player* pPlayer = i->GetSource())
					if ((pPlayer->GetPhaseMask() & phase) == 0)
						pPlayer->RemoveAurasDueToSpell(GetSpellForPhaseMask(pPlayer->GetPhaseMask()));
            }

			return false;
		}
开发者ID:AlexHjelm,项目名称:sunwell,代码行数:26,代码来源:boss_herald_volazj.cpp

示例3: SummonedCreatureDespawn

        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::PlayerList const& players = me->GetMap()->GetPlayers();
            for (Map::PlayerList::const_iterator i = players.begin(); i != players.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);
                }
            }
        }
开发者ID:dantewow,项目名称:TrinityCore,代码行数:33,代码来源:boss_herald_volazj.cpp

示例4: JustSummoned

		void JustSummoned(Creature* summon)
		{
			for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
				if (*itr == summon->GetGUID())
					return;
			summons.Summon(summon);
		}
开发者ID:Cryostorm,项目名称:SunwellCore,代码行数:7,代码来源:boss_felblood_kaelthas.cpp

示例5: scheduleThirdPhase

            void scheduleThirdPhase()
            {
                if (!me->isInCombat())
                {
                    for (int i = 0; i < 2; ++i)
                        if (Creature* totem = ObjectAccessor::GetCreature(*me, TotemGUID[i]))
                            totem->CastSpell(me, TotemSpell[i], false);
                }
                else
                {
                    for (SummonList::iterator itr = AcridTears.begin(); itr != AcridTears.end(); ++itr)
                    {
                        if (Creature* acrid = ObjectAccessor::GetCreature(*me, *itr))
                        {
                            acrid->CastSpell(acrid, SPELL_VENOXIS_ULT_COSMETIC, false);
                            acrid->RemoveAllAuras();
                            acrid->DespawnOrUnsummon(2000);
                        }
                    }

                    Talk(SAY_BLOODVENOM);
                    Talk(EMOTE_BLOODVENOM);
                    me->CastSpell((Unit*)NULL, SPELL_BLOODVENOM_TRIGGERED, false);
                    events.ScheduleEvent(EVENT_VENOM_WITHDRAWAL, 15000);
					events.ScheduleEvent(EVENT_VENOMOUS_EFFUSION, 1000);
                    events.ScheduleEvent(EVENT_SET_BLOODVENOM_PLAYER, 4000);
                }
            }
开发者ID:Cryostorm,项目名称:WowSource434,代码行数:28,代码来源:boss_venoxis.cpp

示例6: MovementInform

        void MovementInform(uint32 type, uint32 id)
        {
            if (type != ESCORT_MOTION_TYPE)
                return;

            // Xinef: we can rely here on internal counting
            if (id == 1)
            {
                me->SummonCreature(NPC_DURNHOLDE_MAGE, 2038.549f, 273.303f, 63.420f, 5.30f, TEMPSUMMON_MANUAL_DESPAWN);
                me->SummonCreature(NPC_DURNHOLDE_VETERAN, 2032.810f, 269.416f, 63.561f, 5.30f, TEMPSUMMON_MANUAL_DESPAWN);
            }
            else if (id == 2)
            {
                me->SummonCreature(NPC_SKARLOC_MOUNT, 2049.12f, 252.31f, 62.855f, me->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN);
                me->Dismount();
                me->SetWalk(true);
                for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
                    if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
                        summon->SetWalk(true);
            }

            if (me->movespline->Finalized())
            {
                events2.ScheduleEvent(EVENT_INITIAL_TALK, 500);
                events2.ScheduleEvent(EVENT_START_FIGHT, 8000);
            }
        }
开发者ID:ReinsCoreWotlk,项目名称:Core,代码行数:27,代码来源:boss_captain_skarloc.cpp

示例7: EnterCombat

		void EnterCombat(Unit* /*who*/)
		{
			me->setActive(true);
			events.Reset();
			events.RescheduleEvent(EVENT_ENRAGE, 600000);
			events.RescheduleEvent(EVENT_SPELL_FREEZING_SLASH, urand(7000,15000));
			events.RescheduleEvent(EVENT_SPELL_PENETRATING_COLD, urand(15000,20000));
			events.RescheduleEvent(EVENT_SUMMON_NERUBIAN, urand(5000,8000));
			events.RescheduleEvent(EVENT_SUBMERGE, SUBMERGE_INTERVAL);
			if( !IsHeroic() )
				events.RescheduleEvent(EVENT_RESPAWN_SPHERE, 4000);

			for( std::list<uint64>::iterator itr = summons.begin(); itr != summons.end(); ++itr )
				if( Creature* c = pInstance->instance->GetCreature(*itr) )
				{
					c->GetMotionMaster()->MoveIdle();
					c->StopMoving();
					c->CastSpell(c, SPELL_SUBMERGE, false);
					c->AI()->DoAction(1);
				}
			summons.clear();
			for( uint8 i=0; i<4; ++i )
				if( Creature* c = me->SummonCreature(NPC_BURROW, AnubLocs[i+1]) )
					BurrowGUID[i] = c->GetGUID();
			for( uint8 i=0; i<6; ++i )
				if( Creature* c = me->SummonCreature(NPC_FROST_SPHERE, AnubLocs[i+5]) )
					SphereGUID[i] = c->GetGUID();

			Talk(SAY_AGGRO);
			DoZoneInCombat();
			if( pInstance )
				pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS);
		}
开发者ID:DSlayerMan,项目名称:Sunwell,代码行数:33,代码来源:boss_anubarak_trial.cpp

示例8: ExplodeAliveGhouls

        void ExplodeAliveGhouls()
        {
            if (summons.empty())
                return;

            for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
                if (Creature* ghoul = me->GetCreature(*me, *itr))
                    ghoul->CastSpell(ghoul, SPELL_EXPLODE);
        }
开发者ID:Ikizami,项目名称:SilverCore,代码行数:9,代码来源:boss_black_knight.cpp

示例9: UpdateAI

        void UpdateAI(uint32 diff)
        {
            events2.Update(diff);
            switch (events2.ExecuteEvent())
            {
            case EVENT_INITIAL_TALK:
                Talk(SAY_ENTER);
                break;
            case EVENT_START_FIGHT:
                me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
                me->SetInCombatWithZone();
                for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
                    if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
                        if (summon->GetEntry() != NPC_SKARLOC_MOUNT)
                        {
                            summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC);
                            summon->SetInCombatWithZone();
                        }
                break;
            }

            if (!UpdateVictim())
                return;

            events.Update(diff);
            if (me->HasUnitState(UNIT_STATE_CASTING))
                return;

            switch (events.ExecuteEvent())
            {
            case EVENT_SPELL_HOLY_LIGHT:
                me->CastSpell(me, SPELL_HOLY_LIGHT, false);
                events.ScheduleEvent(EVENT_SPELL_HOLY_LIGHT, 20000);
                break;
            case EVENT_SPELL_CLEANSE:
                if (roll_chance_i(33))
                    Talk(SAY_TAUNT);
                me->CastSpell(me, SPELL_CLEANSE, false);
                events.ScheduleEvent(EVENT_SPELL_CLEANSE, 10000);
                break;
            case EVENT_SPELL_HAMMER:
                me->CastSpell(me->GetVictim(), SPELL_HAMMER_OF_JUSTICE, false);
                events.ScheduleEvent(EVENT_SPELL_HAMMER, 30000);
                break;
            case EVENT_SPELL_HOLY_SHIELD:
                me->CastSpell(me, SPELL_CLEANSE, false);
                events.ScheduleEvent(SPELL_HOLY_SHIELD, 30000);
                break;
            case EVENT_SPELL_CONSECRATION:
                me->CastSpell(me, SPELL_CONSECRATION, false);
                events.ScheduleEvent(EVENT_SPELL_CONSECRATION, 20000);
                break;

            }

            DoMeleeAttackIfReady();
        }
开发者ID:ReinsCoreWotlk,项目名称:Core,代码行数:57,代码来源:boss_captain_skarloc.cpp

示例10: DoAction

        void DoAction(int32 action)
        {
            if (action == ACTION_REPENTANCE_DONE)
            {
                lSummons.DespawnEntry(NPC_SOUL_FRAGMENT);

                for (SummonList::const_iterator itr = lSummons.begin(); itr != lSummons.end(); ++itr)
					if (Creature* pSummon = ObjectAccessor::GetCreature(*me, (*itr)))
                        if (pSummon->GetEntry() == NPC_REPENTANCE_MIRROR && pSummon->IsAIEnabled)
                            pSummon->AI()->DoAction(ACTION_REPENTANCE_DONE);
                    
                events.ScheduleEvent(EVENT_REPENTANCE, 1500, 0, PHASE_REPENTANCE);
            }
        }
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:14,代码来源:boss_high_prophet_barim.cpp

示例11: SendLavaWaves

        void SendLavaWaves(bool start)
        {
            Unit* cr = NULL;
            for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
            {
                cr = ObjectAccessor::GetUnit(*me, *itr);
                if (!cr || cr->GetEntry() != NPC_FLAME_TSUNAMI)
                    continue;

                if (start)
                    cr->GetMotionMaster()->MovePoint(0, ((cr->GetPositionX() < 3250.0f) ? 3283.44f : 3208.44f), cr->GetPositionY(), cr->GetPositionZ());
                else
                    cr->SetObjectScale(0.1f);
            }
        }
开发者ID:boom8866,项目名称:azerothcore-wotlk,代码行数:15,代码来源:boss_sartharion.cpp

示例12: SetBloodvenomTarget

            void SetBloodvenomTarget()
            {
                ThreatContainer::StorageType threatList = me->getThreatManager().getThreatList();
                ThreatContainer::StorageType::const_iterator hostileReference = threatList.begin();
                SummonList::const_iterator bloodvenomGUID = BloodVenoms.begin();

                while (bloodvenomGUID != BloodVenoms.end() && hostileReference != threatList.end())
                {
                    if (Creature* bloodvenom = ObjectAccessor::GetCreature(*me, *bloodvenomGUID))
                        bloodvenom->AI()->SetGUID((*hostileReference)->getUnitGuid());

                    ++hostileReference;
                    ++bloodvenomGUID;
                }
            }
开发者ID:AtVirus,项目名称:Forgotten-Lands-Source,代码行数:15,代码来源:boss_venoxis.cpp

示例13: UpdateAI

            void UpdateAI(uint32 diff)
            {
                if (!UpdateVictim())
                    return;

                events.Update(diff);
                if (me->HasUnitState(UNIT_STATE_CASTING))
                    return;

                switch (events.GetEvent())
                {
					case EVENT_FREEZING_GROUND:
                        if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
							me->CastSpell(target, SPELL_FREEZING_GROUND, false);
                        events.RepeatEvent(20000);
                        break;
                    case EVENT_FROZEN_ORB_STALKER:
                        me->CastCustomSpell(SPELL_FROZEN_ORB, SPELLVALUE_MAX_TARGETS, RAID_MODE(1, 3), me, false);
                        events.RepeatEvent(35000);
						events.ScheduleEvent(EVENT_CHECK_SUMMONS, 10000);
                        break;
					case EVENT_CHECK_SUMMONS:
						for (SummonList::iterator i = summons.begin(); i != summons.end();)
						{
							if (Creature* cr = ObjectAccessor::GetCreature(*me, *i))
							{
								if (!cr->IsAlive())
									summons.erase(i++);
								else
									++i;
							}
							else
								summons.erase(i++);
						}
						if (summons.empty())
						{
							events.PopEvent();
							me->CastSpell(me, SPELL_WHITEOUT, false);
							break;
						}
						events.RepeatEvent(2000);
						break;
                }

                DoMeleeAttackIfReady();
            }
开发者ID:DSlayerMan,项目名称:Sunwell,代码行数:46,代码来源:boss_toravon.cpp

示例14: JustDied

        void JustDied(Unit* /*killer*/)
        {
            Talk(SAY_DEATH);
            for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
                if (Creature* cr = ObjectAccessor::GetCreature(*me, (*itr)))
                {
                    if (cr->GetEntry() == NPC_TIME_RIFT)
                        cr->DespawnOrUnsummon(1000);
                    else
                    {
                        cr->DespawnOrUnsummon(5000);
                        cr->RemoveAllAuras();
                        cr->MonsterSay("You have my thanks for saving my existence in this timeline. Now i must report back to my superiors. They must know immediately of what i just experienced.", LANG_UNIVERSAL, 0);
                    }
                }

            if (InstanceScript* pInstance = me->GetInstanceScript())
                pInstance->SetData(DATA_SHOW_INFINITE_TIMER, 0);
        }
开发者ID:AzerothShard-Dev,项目名称:azerothcore,代码行数:19,代码来源:boss_infinite.cpp

示例15: SummonedCreatureDespawn

        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* 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())
                    {
                        if (player->HasAura(spell))
                        {
                            player->RemoveAurasDueToSpell(spell);
                            if (spell2) // if there is still some different mask cast spell for it
                                player->CastSpell(player, spell2, true);
                        }
                    }
                }
            }
        }
开发者ID:Adrya,项目名称:CrystalShard,代码行数:43,代码来源:boss_herald_volazj.cpp


注:本文中的SummonList::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。