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


C++ Creature::DestroyForNearbyPlayers方法代码示例

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


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

示例1: DespawnAll

void SummonList::DespawnAll(uint32 msTimeToDespawn) {
    while (!empty()) {
        Creature* summon = Unit::GetCreature(*me, *begin());
        if (!summon)
            erase(begin());
        else {
            erase(begin());
            if (TempSummon* summ = summon->ToTempSummon()) {
                summon->DestroyForNearbyPlayers();
                summ->UnSummon(msTimeToDespawn);
            } else
                summon->DespawnOrUnsummon(msTimeToDespawn);
        }
    }
}
开发者ID:BlueSellafield,项目名称:ArkCORE,代码行数:15,代码来源:ScriptedCreature.cpp

示例2: DespawnAll

void SummonList::DespawnAll()
{
    while(!empty())
    {
        Creature *summon = Unit::GetCreature(*m_creature, *begin());
        if (!summon)
            erase(begin());
        else
        {
            erase(begin());
            if (summon->isSummon())
            {
                summon->DestroyForNearbyPlayers();
                CAST_SUM(summon)->UnSummon();
            }
            else
                summon->DisappearAndDie();
        }
    }
}
开发者ID:Ickybad,项目名称:diamondcore2,代码行数:20,代码来源:ScriptedCreature.cpp

示例3: DespawnAll

void SummonList::DespawnAll()
{
    while (!empty())
    {
        Creature* summon = Unit::GetCreature(*me, *begin());
        if (!summon)
            erase(begin());
        else
        {
            erase(begin());
            if (TempSummon* summ = summon->ToTempSummon())
            {
                summon->DestroyForNearbyPlayers();
                summ->UnSummon();
            }
            else
                summon->DisappearAndDie();
        }
    }
}
开发者ID:caedus,项目名称:ArkCORE,代码行数:20,代码来源:ScriptedCreature.cpp

示例4: SetData


//.........这里部分代码省略.........
                        _crateCount = data;
						DoUpdateWorldState(WORLDSTATE_CRATES_REVEALED, _crateCount);
                        if (_crateCount == 5)
                        {
                            if (Creature* bunny = instance->GetCreature(_genericBunnyGUID))
                                bunny->CastSpell(bunny, SPELL_CRATES_CREDIT, true);

							// Summon Chromie and global whisper
                            if (Creature* chromie = instance->SummonCreature(NPC_CHROMIE_2, ChromieSummonPos))
                                if (!instance->GetPlayers().isEmpty())
                                    if (Player* player = instance->GetPlayers().getFirst()->getSource())
                                        sCreatureTextMgr->SendChat(chromie, SAY_CRATES_COMPLETED, player->GetGUID(), CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_ZONE);

							DoUpdateWorldState(WORLDSTATE_SHOW_CRATES, 0);

							if(Creature* crier = instance->GetCreature(_lordaeronCrierGUID))
								crier->YellToZone(-1595053, LANG_UNIVERSAL, 0);
						}
                        break;
                    case DATA_TRANSFORM_CITIZENS:
                        switch(data)
                        {
                            case SPECIAL: // Respawn Zombies
                                while(!_zombiesList.empty())
                                {
                                    Creature* summon = instance->GetCreature(*_zombiesList.begin());
                                    if(!summon)
                                        _zombiesList.erase(_zombiesList.begin());
                                    else
                                    {
                                        _zombiesList.erase(_zombiesList.begin());
                                        if(TempSummon* summ = summon->ToTempSummon())
                                        {
                                            summon->DestroyForNearbyPlayers();
                                            summ->UnSummon();
                                        }
                                        else
                                            summon->DisappearAndDie();
                                    }
                                }
                            case IN_PROGRESS: // Transform Citizens
                                for(std::list<uint64>::iterator itr = _citizensList.begin(); itr != _citizensList.end(); ++itr)
                                    if(Creature* citizen = instance->GetCreature((*itr)))
                                    {
                                        if(Creature* arthas = instance->GetCreature(GetData64(DATA_ARTHAS)))
                                            if(Creature* risenZombie = arthas->SummonCreature(NPC_ZOMBIE, citizen->GetPositionX(), citizen->GetPositionY(), citizen->GetPositionZ(), citizen->GetOrientation())) //, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000))
											{
                                                _zombiesList.push_back(risenZombie->GetGUID());
												risenZombie->SetRespawnTime(60);
												risenZombie->GetMotionMaster()->MoveRandom(10.0f);
											}
                                        citizen->SetPhaseMask(2, true);
                                    }
                                break;
                        }
                        break;
                    case DATA_ZOMBIEFEST:
                        if(!instance->IsHeroic() || GetData(DATA_ZOMBIEFEST) == DONE)
                            break;

                        switch(data)
                        {
                            case DONE:
                                //DoCompleteAchievement(ACHIEVEMENT_ZOMBIEFEST);
                                _zombieFest = data;
                                break;
开发者ID:mryanlam,项目名称:Old-TrinityCore-Project-Script.me-,代码行数:67,代码来源:instance_culling_of_stratholme.cpp


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