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


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

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


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

示例1: 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* 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);
                        }
                    }
                }
            }
        }
开发者ID:CarlosX,项目名称:VoragineCore,代码行数:43,代码来源:boss_herald_volazj.cpp

示例2: 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* 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);
                    }
                }
            }
        }
开发者ID:Clementon,项目名称:ElunaTrinityCata,代码行数:40,代码来源:boss_herald_volazj.cpp

示例3: SummonedCreatureDespawn

 void SummonedCreatureDespawn(Creature* summon)
 {
     if (summon->GetEntry() == NPC_DEFENDER || summon->GetEntry() == 23523 || summon->GetEntry() == 23318 || summon->GetEntry() == 23524)
         summons.Despawn(summon);
 }
开发者ID:Fose,项目名称:TrinityCore,代码行数:5,代码来源:boss_shade_of_akama.cpp

示例4: SummonedCreatureDespawn

		void SummonedCreatureDespawn(Creature* creature)
		{
			summons.Despawn(creature);
		}
开发者ID:InkVisible,项目名称:wow,代码行数:4,代码来源:boss_rotface.cpp

示例5: SummonedMobDied

 void SummonedMobDied(Creature *pSummoned)
 {
     listOfMobs.Despawn(pSummoned);
     if (pSummoned)
         pInstance->SetData64(DATA_DELETE_TRASH_MOB, pSummoned->GetGUID());
 }
开发者ID:Helias,项目名称:azerothcore-wotlk,代码行数:6,代码来源:violet_hold.cpp

示例6: SummonedCreatureDespawn

 void SummonedCreatureDespawn(Creature* pSummoned)
 {
     if (pSummoned->GetEntry() == CREATURE_GRAUF)
         m_uiGraufGUID = 0;
     Summons.Despawn(pSummoned);
 }
开发者ID:tauri,项目名称:ArkCORE,代码行数:6,代码来源:boss_skadi.cpp

示例7: SummonedCreatureDespawn

 void SummonedCreatureDespawn(Creature* pSummoned)
 {
     Summons.Despawn(pSummoned);
     --KillCount;
 }
开发者ID:Bootz,项目名称:OpenStage-Project,代码行数:5,代码来源:silverpine_forest.cpp

示例8: SummonedCreatureDespawn

 void SummonedCreatureDespawn(Creature* summoned)
 {
     if (summoned->GetEntry() == NPC_SPARK_OF_IONAR)
         lSparkList.Despawn(summoned);
 }
开发者ID:PavelDev,项目名称:wodnetcore,代码行数:5,代码来源:boss_ionar.cpp

示例9: SummonedCreatureDies

 void SummonedCreatureDies(Creature* summoned, Unit* /*who*/) override
 {
     Summons.Despawn(summoned);
     ++KillCount;
 }
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:5,代码来源:zone_eversong_woods.cpp

示例10: SummonedCreatureDespawn

 void SummonedCreatureDespawn(Creature* summoned)
 {
     Summons.Despawn(summoned);
 }
开发者ID:Drethek,项目名称:Darkpeninsula-Cata-Old,代码行数:4,代码来源:gilneas.cpp

示例11: SummonedCreatureDies

			void SummonedCreatureDies(Creature* cr, Unit*)
			{
				summons.Despawn(cr);
				events.ScheduleEvent(EVENT_SUMMON_NEXT_MINION, 4000);
			}
开发者ID:AlexHjelm,项目名称:sunwell,代码行数:5,代码来源:boss_emalon.cpp

示例12: SummonedCreatureDies

 void SummonedCreatureDies(Creature* summoned, Unit* /*killer*/) override
 {
     listOfMobs.Despawn(summoned);
     instance->SetGuidData(DATA_DEL_TRASH_MOB, summoned->GetGUID());
 }
开发者ID:BackStap,项目名称:TrinityCore,代码行数:5,代码来源:violet_hold.cpp

示例13: SummonedMobDied

 void SummonedMobDied(Creature* summoned)
 {
     listOfMobs.Despawn(summoned);
     if (summoned)
         instance->SetData64(DATA_DEL_TRASH_MOB, summoned->GetGUID());
 }
开发者ID:profPlum,项目名称:TrinityCore,代码行数:6,代码来源:violet_hold.cpp

示例14: SummonedCreatureDespawn

 void SummonedCreatureDespawn(Creature* summon) override
 {
     Summons.Despawn(summon);
 }
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:4,代码来源:boss_hydross_the_unstable.cpp

示例15: SummonedCreatureDespawn

 void SummonedCreatureDespawn(Creature* summoned) override
 {
     Summons.Despawn(summoned);
     --KillCount;
 }
开发者ID:mynew4,项目名称:Tartarus-WoW-Core-3.3.5,代码行数:5,代码来源:zone_silverpine_forest.cpp


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