您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetCreatureListWithEntryInGrid函数代码示例

51自学网 2021-06-01 21:05:46
  C++
这篇教程C++ GetCreatureListWithEntryInGrid函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetCreatureListWithEntryInGrid函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCreatureListWithEntryInGrid函数的具体用法?C++ GetCreatureListWithEntryInGrid怎么用?C++ GetCreatureListWithEntryInGrid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: DespawnSphere

    void DespawnSphere()    {        std::list<Creature*> assistList;        GetCreatureListWithEntryInGrid(assistList,m_creature, NPC_ETHEREAL_SPHERE ,150.0f);        if (assistList.empty())            return;        for(std::list<Creature*>::iterator iter = assistList.begin(); iter != assistList.end(); ++iter)            (*iter)->DealDamage((*iter), (*iter)->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);    }
开发者ID:MrGrom,项目名称:scriptdev2,代码行数:11,


示例2: UpdateOrientation

            void UpdateOrientation()            {                std::list<Creature*> beamTarList;                uint64 tarGuid = 0;                GetCreatureListWithEntryInGrid(beamTarList, me, YELLOW_EYE_MOVER, 200.0f);                for (auto Beam : beamTarList)                    tarGuid = Beam->GetGUID();                if (Creature* beamTar = ObjectAccessor::GetCreature(*me, tarGuid))                    me->SetFacingToObject(beamTar);            }
开发者ID:Exodius,项目名称:JadeCore548,代码行数:11,


示例3: DespawnCreatures

        void DespawnCreatures(uint32 entry, float distance)        {            std::list<Creature*> creatures;            GetCreatureListWithEntryInGrid(creatures, me, entry, distance);            if (creatures.empty())                return;            for (std::list<Creature*>::iterator iter = creatures.begin(); iter != creatures.end(); ++iter)                (*iter)->DespawnOrUnsummon();        }
开发者ID:Caydan,项目名称:DeathCore,代码行数:11,


示例4: SendWaypoint

 void SendWaypoint() {     std::list<Creature*> lVoidwalkerList;     GetCreatureListWithEntryInGrid(lVoidwalkerList, m_creature, NPC_VOIDWALKER, 50.0f);     for (std::list<Creature*>::iterator itr = lVoidwalkerList.begin(); itr != lVoidwalkerList.end(); ++itr)     {         if ((*itr)->isAlive())             if (mob_arugal_voidwalkerAI* pVoidwalkerAI = dynamic_cast<mob_arugal_voidwalkerAI*>((*itr)->AI()))                 pVoidwalkerAI->ReceiveWaypoint(m_uiCurrentPoint, m_bReverse);     } }
开发者ID:Ozerev,项目名称:mangos-tbc,代码行数:11,


示例5: DespawnAdds

    void DespawnAdds()    {        CreatureList pWorshippers;        GetCreatureListWithEntryInGrid(pWorshippers, m_creature, NPC_WORSHIPPER, DEFAULT_VISIBILITY_INSTANCE);        if (!pWorshippers.empty())            for(CreatureList::iterator itr = pWorshippers.begin(); itr != pWorshippers.end(); ++itr)            {                (*itr)->ForcedDespawn();            }        CreatureList pFollower;        GetCreatureListWithEntryInGrid(pFollower, m_creature, NPC_FOLLOWER, DEFAULT_VISIBILITY_INSTANCE);        if (!pFollower.empty())            for(CreatureList::iterator iter = pFollower.begin(); iter != pFollower.end(); ++iter)            {                (*iter)->ForcedDespawn();            }    }
开发者ID:Tasssadar,项目名称:catcore,代码行数:20,


示例6: LavaSpoutErrupt

        void LavaSpoutErrupt()        {            std::list<Creature*> creatures;            GetCreatureListWithEntryInGrid(creatures, me, NPC_LAVA_SPOUT_TRIGGER, 1000.0f);            if (creatures.empty())                return;            for (std::list<Creature*>::iterator iter = creatures.begin(); iter != creatures.end(); ++iter)                (*iter)->CastSpell((*iter),SPELL_LAVA_SPOUT, true);        }
开发者ID:Caydan,项目名称:DeathCore,代码行数:11,


示例7: DespawnCreature

 void DespawnCreature(uint32 entry) {     std::list<Creature*> creatureList;     GetCreatureListWithEntryInGrid(creatureList, me, entry, 80.0f);     for (auto NowCreature : creatureList)     {         if (NowCreature->GetEntry() == BLUE_FOG && NowCreature->GetDisplayId() == NowCreature->GetNativeDisplayId()) // if blue fog was been activated not despawn him             continue;         NowCreature->DespawnOrUnsummon();     } }
开发者ID:Exodius,项目名称:JadeCore548,代码行数:11,


示例8: allStartMobsDead

    bool allStartMobsDead()    {        std::list<Creature* > lCreatureList;        GetCreatureListWithEntryInGrid(lCreatureList, m_creature, NPC_TWILIGHT_INITIATE, 40.);        if (!lCreatureList.empty())            for(std::list<Creature*>::iterator itr = lCreatureList.begin(); itr != lCreatureList.end(); ++itr)                if ((*itr)->isAlive())                    return false;        return true;    }
开发者ID:leecher228,项目名称:scriptdev2,代码行数:12,


示例9: RespawnBeams

 void RespawnBeams() {     std::list<Creature*> creatures;     GetCreatureListWithEntryInGrid(creatures, me, NPC_JINARA_BEAM, 100.0f);     if (creatures.empty())         return;     for (std::list<Creature*>::iterator iter = creatures.begin(); iter != creatures.end(); ++iter)     {         if ((*iter)->isDead())             (*iter)->Respawn();     } }
开发者ID:beyourself,项目名称:Wow-4.3.4,代码行数:12,


示例10: DamageTaken

    void DamageTaken(Unit* pDoneBy, uint32& uiDamage, DamageEffectType /*damagetype*/) override    {        if (uiDamage > m_creature->GetHealth() || m_creature->GetHealthPercent() < 20.0f)        {            if (Player* pPlayer = pDoneBy->GetBeneficiaryPlayer())            {                if (pPlayer->GetQuestStatus(QUEST_MISSING_DIPLO_PT16) == QUEST_STATUS_INCOMPLETE)                    guidPlayer = pPlayer->GetObjectGuid();  // Store the player to give quest credit later            }            uiDamage = 0;            DoScriptText(EMOTE_SURRENDER, m_creature);            EnterEvadeMode();            // Make the two sentries flee and despawn            CreatureList lSentryList;            GetCreatureListWithEntryInGrid(lSentryList, m_creature, NPC_SENTRY, 40.0f);            for (CreatureList::const_iterator itr = lSentryList.begin(); itr != lSentryList.end(); ++itr)            {                if ((*itr)->isAlive())                {                    (*itr)->RemoveAllAurasOnEvade();                    (*itr)->CombatStop(true);                    (*itr)->SetWalk(false);                    (*itr)->GetMotionMaster()->MovePoint(0, fSentryFleePoint[0], fSentryFleePoint[1], fSentryFleePoint[2]);                    (*itr)->ForcedDespawn(4000);                }            }            // Summon Jaina Proudmoore, Archmage Tervosh and Pained            for (const auto& lOutroSpawn : lOutroSpawns)            {                Creature* pCreature = m_creature->SummonCreature(lOutroSpawn.uiEntry, lOutroSpawn.fX, lOutroSpawn.fY, lOutroSpawn.fZ, lOutroSpawn.fO, TEMPSPAWN_TIMED_DESPAWN, 3 * MINUTE * IN_MILLISECONDS, false, true);                if (pCreature)                {                    pCreature->CastSpell(pCreature, SPELL_TELEPORT_VISUAL, TRIGGERED_NONE);                    pCreature->GetMotionMaster()->MovePoint(0, lOutroSpawn.fDestX, lOutroSpawn.fDestY, lOutroSpawn.fDestZ);                    // Exception case for Archmage Tervosh: the outro event is a simple speech with visual spell cast                    // so it will be handled by a DBScript held by NPC Archmage Tervosh                    if (pCreature->GetEntry() == NPC_TERVOSH)                    {                        // Remove Gossip and Quest Giver flag from now, they will be re-added later to Archmage Tervosh in DBScript                        pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER | UNIT_NPC_FLAG_GOSSIP);                        // The DBScript will be done here                        pCreature->GetMotionMaster()->MoveWaypoint(0);                    }                }            }        }    }
开发者ID:Phatcat,项目名称:mangos-wotlk,代码行数:53,


示例11: UpdateAI

    void UpdateAI(const uint32 uiDiff) override    {        if (m_uiStartTimer)        {            if (m_uiStartTimer <= uiDiff)            {                // get all the bats list in range; note: this will compare the 2D distance                std::list<Creature*> lBatsList;                GetCreatureListWithEntryInGrid(lBatsList, m_creature, NPC_DARKCLAW_BAT, 10.0f);                if (lBatsList.empty())                {                    m_uiStartTimer = 5000;                    return;                }                // sort by distance and get only the closest                lBatsList.sort(ObjectDistanceOrder(m_creature));                std::list<Creature*>::const_iterator batItr = lBatsList.begin();                Creature* pBat = NULL;                do                {                    // check for alive and out of combat only                    if ((*batItr)->isAlive() && !(*batItr)->getVictim())                        pBat = *batItr;                    ++batItr;                }                while (!pBat && batItr != lBatsList.end());                if (!pBat)                {                    m_uiStartTimer = 5000;                    return;                }                // Move bat to the point                float fX, fY, fZ;                pBat->SetWalk(false);                pBat->GetMotionMaster()->Clear();                m_creature->GetContactPoint(pBat, fX, fY, fZ);                pBat->GetMotionMaster()->MovePoint(0, fX, fY, fZ);                m_selectedBatGuid = pBat->GetObjectGuid();                m_uiStartTimer = 0;                m_bHasValidBat = true;            }            else                m_uiStartTimer -= uiDiff;        }    }
开发者ID:AwkwardDev,项目名称:mangos-d3,代码行数:53,


示例12: ShowMushrooms

 void ShowMushrooms(bool show = true) {     std::list<Creature*> lMushroomsHealthy;     GetCreatureListWithEntryInGrid(lMushroomsHealthy, m_creature, NPC_HEALTHY_MUSHROOM, 150.0f);     for(std::list<Creature*>::iterator itr1 = lMushroomsHealthy.begin(); itr1 != lMushroomsHealthy.end(); ++itr1)     {         if(show)             (*itr1)->SetVisibility(VISIBILITY_ON);         else             (*itr1)->SetVisibility(VISIBILITY_OFF);     }     std::list<Creature*> lMushroomsPoison;     GetCreatureListWithEntryInGrid(lMushroomsPoison, m_creature, NPC_POISONOUS_MUSHROOM, 150.0f);     for(std::list<Creature*>::iterator itr2 = lMushroomsPoison.begin(); itr2 != lMushroomsPoison.end(); ++itr2)     {         if(show)             (*itr2)->SetVisibility(VISIBILITY_ON);         else             (*itr2)->SetVisibility(VISIBILITY_OFF);     } }
开发者ID:Ancient,项目名称:scriptdev2,代码行数:21,


示例13: JustStartedEscort

    void JustStartedEscort()    {        m_uiEventTimer = 5000;        m_uiEventCount = 0;        m_lResearchersList.clear();        GetCreatureListWithEntryInGrid(m_lResearchersList, m_creature, NPC_RESEARCHER, 25.0f);        if (!m_lResearchersList.empty())            SetFormation();    }
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:12,


示例14: DoWorldInFlamesEvent

        void DoWorldInFlamesEvent()        {            std::list<Creature*> munitionList;            GetCreatureListWithEntryInGrid(munitionList, me, NPC_STABLE_MUNITION, 100.0f);            for (std::list<Creature*>::const_iterator i = munitionList.begin(); i != munitionList.end(); ++i)            {                (*i)->RemoveAurasDueToSpell(SPELL_MUNITION_STABLE);                (*i)->CastSpell((*i), SPELL_MUNITION_EXPLOSION, true);                (*i)->DespawnOrUnsummon(2000);            }        }
开发者ID:Shiroy,项目名称:Mist-Eria-Core510,代码行数:12,


示例15: Reset

    void Reset() override    {        m_creature->SetWalk(true);        m_uiDarkOffering = urand(4400, 12500);        m_bWPDone = true;        Creature* pLeader = m_creature->GetMap()->GetCreature(m_leaderGuid);        if (pLeader && pLeader->isAlive())        {            m_creature->GetMotionMaster()->MoveFollow(pLeader, 1.0f, M_PI / 2 * m_uiPosition);        }        else        {            std::list<Creature*> lVoidwalkerList;            Creature* pNewLeader = NULL;            uint8 uiHighestPosition = 0;            GetCreatureListWithEntryInGrid(lVoidwalkerList, m_creature, NPC_VOIDWALKER, 50.0f);            for (std::list<Creature*>::iterator itr = lVoidwalkerList.begin(); itr != lVoidwalkerList.end(); ++itr)            {                if ((*itr)->isAlive())                {                    if (mob_arugal_voidwalkerAI* pVoidwalkerAI = dynamic_cast<mob_arugal_voidwalkerAI*>((*itr)->AI()))                    {                        uint8 uiPosition = pVoidwalkerAI->GetPosition();                        if (uiPosition > uiHighestPosition)                        {                            pNewLeader = (*itr);                            uiHighestPosition = uiPosition;                        }                    }                }            }            if (pNewLeader)            {                m_leaderGuid = pNewLeader->GetObjectGuid();                if (pNewLeader == m_creature)                {                    m_bIsLeader = true;                    m_bWPDone = true;                }                else                    m_creature->GetMotionMaster()->MoveFollow(pNewLeader, 1.0f, M_PI / 2 * m_uiPosition);            }            else            {                pNewLeader = m_creature;                m_bIsLeader = true;                m_bWPDone = true;            }        }    }
开发者ID:krullgor,项目名称:mangos-wotlk,代码行数:52,


示例16: UpdateAI

 void UpdateAI(const uint32 uiDiff) {     if (m_uiCheckRangeTimer < uiDiff)     {         if (m_creature->GetDistance(END_X, END_Y, END_Z) < 30)         {             if( VehicleKitPtr vehicle = m_creature->GetVehicleKit())             {                 if (Unit* pPlayer = vehicle->GetPassenger(0))                 {                     if (pPlayer->GetTypeId() == TYPEID_PLAYER)                     {                         for (int8 i = 1; i < 4; ++i)                         {                             if (Unit* pPrisoner = vehicle->GetPassenger(i))                             {                                 pPlayer->DealDamage(pPrisoner, pPrisoner->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);                             }                         }                         ((Player*)pPlayer)->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid());                         pPlayer->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);                     }                 }             }         }         else         {             if (boarded < 3)             {                 std::list<Creature*> pPrisonerList;                 GetCreatureListWithEntryInGrid(pPrisonerList, m_creature, NPC_ICE_PRISONER, 30.0f);                 if (!pPrisonerList.empty())                 {                     for(std::list<Creature*>::iterator iter = pPrisonerList.begin(); iter != pPrisonerList.end(); ++iter)                     {                         if (Creature* pPrisoner = (*iter))                         {                             if (pPrisoner->isAlive())                             {                                 DoCast(pPrisoner, SPELL_SUMMON_FREE_PRISONER);                                 pPrisoner->ForcedDespawn();                             }                         }                     }                 }             }         }         m_uiCheckRangeTimer = 2000;     }     else         m_uiCheckRangeTimer -= uiDiff; }
开发者ID:Reamer,项目名称:scriptdev2,代码行数:52,


示例17: WaypointReached

    void WaypointReached(uint32 uiPointId) override    {        switch (uiPointId)        {            case 2:                DoScriptText(SAY_HANES_FIRE_1, m_creature);                break;            case 3:                DoScriptText(SAY_HANES_FIRE_2, m_creature);                break;            case 14:            case 20:            case 21:            case 29:            {                m_creature->HandleEmote(EMOTE_ONESHOT_ATTACK1H);                // set all nearby triggers on fire - ToDo: research if done by spell!                std::list<Creature*> lTriggersInRange;                GetCreatureListWithEntryInGrid(lTriggersInRange, m_creature, NPC_HANES_TRIGGER, 10.0f);                for (std::list<Creature*>::const_iterator itr = lTriggersInRange.begin(); itr != lTriggersInRange.end(); ++itr)                {                    (*itr)->CastSpell((*itr), SPELL_LOW_POLY_FIRE, true);                    (*itr)->ForcedDespawn(30000);                }                break;            }            case 15:                DoScriptText(SAY_HANES_SUPPLIES_1, m_creature);                break;            case 22:                DoScriptText(SAY_HANES_SUPPLIES_2, m_creature);                break;            case 30:                m_creature->HandleEmote(EMOTE_ONESHOT_LAUGH_NOSHEATHE);                break;            case 31:                DoScriptText(SAY_HANES_SUPPLIES_COMPLETE, m_creature);                break;            case 32:                DoScriptText(SAY_HANES_SUPPLIES_ESCAPE, m_creature);                break;            case 40:                DoScriptText(SAY_HANES_ARRIVE_BASE, m_creature);                break;            case 44:                if (Player* pPlayer = GetPlayerForEscort())                    pPlayer->GroupEventHappens(QUEST_ID_TRIAL_OF_FIRE, m_creature);                break;        }    }
开发者ID:AwkwardDev,项目名称:mangos-d3,代码行数:52,


示例18: DoRemoveAdds

    void DoRemoveAdds()    {        for (GuidList::iterator i = m_lSummonedAddsGuids.begin(); i != m_lSummonedAddsGuids.end(); ++i)        {            if (Creature* pTmp = m_creature->GetMap()->GetCreature(*i))                pTmp->ForcedDespawn();        }        std::list<Creature*> lWorms;        GetCreatureListWithEntryInGrid(lWorms, m_creature, NPC_ROT_WORM, 100.0f);        for (std::list<Creature*>::iterator i = lWorms.begin(); i != lWorms.end(); ++i)            (*i)->ForcedDespawn();    }
开发者ID:concept45,项目名称:RustEmu-SD2,代码行数:13,


示例19: JustReachedHome

    void JustReachedHome() override    {        if (m_pInstance)            m_pInstance->SetData(TYPE_NETHEKURSE, FAIL);        std::list<Creature*> lFelConverts;        GetCreatureListWithEntryInGrid(lFelConverts, m_creature, NPC_FEL_ORC_CONVERT, 40.0f);        for (std::list<Creature*>::iterator itr = lFelConverts.begin(); itr != lFelConverts.end(); ++itr)        {            if (!(*itr)->isAlive())                (*itr)->Respawn();        }    }
开发者ID:mynew4,项目名称:RustEmu-Core,代码行数:13,


示例20: HandleScript

        void HandleScript(SpellEffIndex effIndex)        {            PreventHitDefaultEffect(effIndex);            std::list<Creature*> triggers;            GetCreatureListWithEntryInGrid(triggers, GetHitUnit(), NPC_BAD_INTENTIONS_TARGET, 100.0f);            if (!triggers.empty())            {                triggers.sort(Trinity::ObjectDistanceOrderPred(GetHitUnit(), true));                Creature* trigger = triggers.front();                GetHitUnit()->CastSpell(trigger, uint32(GetEffectValue()), true);            }        }
开发者ID:P-Kito,项目名称:InfinityCore,代码行数:13,


示例21: CastBunnySpell

    void CastBunnySpell(Creature* pTarget, uint32 uSpell)    {        if (!uSpell)            return;        std::list<Creature*> creatureList;        GetCreatureListWithEntryInGrid(creatureList, m_creature, NPC_VIMGOL_VISUAL_BUNNY, 200.0f);        for (auto& bunny : creatureList)            for (auto it = m_uiBunnyGuids.begin(); it != m_uiBunnyGuids.end(); ++it)                if ((*it) == bunny->GetObjectGuid())                    if (m_uiActiveCircles[std::distance(m_uiBunnyGuids.begin(), it)])                        bunny->CastSpell(pTarget ? pTarget : bunny, uSpell, TRIGGERED_OLD_TRIGGERED);    }
开发者ID:BThallid,项目名称:mangos,代码行数:13,


示例22: UnSummonAllCreatures

    void UnSummonAllCreatures()    {        for (GuidMap::const_iterator i = CurrSummons.begin(); i != CurrSummons.end(); ++i)            if (Creature *pSummon = m_creature->GetMap()->GetCreature(i->second))                pSummon->ForcedDespawn();        CurrSummons.clear();        //not summoned by Algalon himself        std::list<Creature*> DarkMatter;        GetCreatureListWithEntryInGrid(DarkMatter, m_creature, NPC_UNLEASHED_DARK_MATTER, 100.0f);        for (std::list<Creature*>::const_iterator i = DarkMatter.begin(); i!= DarkMatter.end(); ++i)            (*i)->ForcedDespawn();    }
开发者ID:Archives,项目名称:pwow_scriptdev2,代码行数:13,


示例23: DoWorldInFlamesEvent

            void DoWorldInFlamesEvent()            {                Talk(TALK_SPECIAL3);                std::list<Creature*> munitionList;                GetCreatureListWithEntryInGrid(munitionList, me, NPC_STABLE_MUNITION, 100.0f);                for (auto itr: munitionList)                {                    itr->RemoveAurasDueToSpell(SPELL_MUNITION_STABLE);                    itr->CastSpell(itr, SPELL_MUNITION_EXPLOSION, true);                    itr->DespawnOrUnsummon(2000);                }            }
开发者ID:ChipLeo,项目名称:SkyFire_5xx,代码行数:13,


示例24: boss_karsh_steelbenderAI

        boss_karsh_steelbenderAI(Creature* creature) : ScriptedAI(creature)        {            instance = creature->GetInstanceScript();			std::list<Creature*> creatures;			GetCreatureListWithEntryInGrid(creatures, me, NPC_LAVA_SPOUT_TRIGGER, 1000.0f);			if (creatures.empty())				return;			for (std::list<Creature*>::iterator iter = creatures.begin(); iter != creatures.end(); ++iter)				(*iter)->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NOT_SELECTABLE);        }
开发者ID:sharq,项目名称:ArkCORE_test,代码行数:13,


示例25: SelectRandomCreatureOfEntryInRange

    Creature* SelectRandomCreatureOfEntryInRange(uint32 uiEntry, float fRange)    {        std::list<Creature* > lCreatureList;        GetCreatureListWithEntryInGrid(lCreatureList, m_creature, uiEntry, fRange);        if (lCreatureList.empty())            return NULL;        std::list<Creature* >::iterator iter = lCreatureList.begin();        advance(iter, urand(0, lCreatureList.size()-1));        return *iter;    }
开发者ID:Krath,项目名称:scriptdev2,代码行数:13,


示例26: JustReachedHome

	void JustReachedHome()	{		std::list<Creature*> lChannelers;		GetCreatureListWithEntryInGrid(lChannelers, m_creature, NPC_CHANNELER, DEFAULT_VISIBILITY_INSTANCE);        if (!lChannelers.empty())        {            for(std::list<Creature*>::iterator iter = lChannelers.begin(); iter != lChannelers.end(); ++iter)            {                if ((*iter) && !(*iter)->isAlive())                    (*iter)->Respawn();            }        }	}
开发者ID:Dkocir,项目名称:ScriptDev2_2010,代码行数:13,


示例27: FindDeathKnight

    void FindDeathKnight()    {        std::list<Creature*> DeathKnight;        GetCreatureListWithEntryInGrid(DeathKnight, m_creature, NPC_DEATH_KNIGHT_UNDERSTUDY, 50.0f);        if (!DeathKnight.empty())        {            DeathKnightList.clear();            for(std::list<Creature*>::iterator itr = DeathKnight.begin(); itr != DeathKnight.end(); ++itr)                DeathKnightList.push_back((*itr)->GetGUID());        }    }
开发者ID:dragonshard,项目名称:scriptdev2,代码行数:13,


示例28: EnterCombat

            void EnterCombat(Unit* /*who*/)            {                std::list<Creature*> searcher;                GetCreatureListWithEntryInGrid(searcher, me, CREATURE_FOUTAIN_TRIGGER, 50.0f);                uint8 tab = 0;                for (auto itr : searcher)                {                    if (!itr)                        continue;                    itr->RemoveAllAuras();                    foutainTrigger[++tab] = itr->GetGUID();                }                searcher.clear();                GetCreatureListWithEntryInGrid(searcher, me, CREATURE_CORRUPT_DROPLET, 50.0f);                for (auto itr : searcher)                {                    if (!itr)                        continue;                    if (itr->isSummon())                        itr->ForcedDespawn();                }                me->SetInCombatWithZone();                me->CastSpell(me, SPELL_WATER_BUBBLE, true);                Talk(TEXT_AGGRO);                Talk(TEXT_BOSS_EMOTE_AGGRO);                intro = true;                phase = 1;                hydrolancePhase = HYDROLANCE_BOTTOM;                events.ScheduleEvent(EVENT_CALL_WATER, 8000);                events.ScheduleEvent(EVENT_HYDROLANCE_START, TIMER_HYDROLANCE_START);                _EnterCombat();            }
开发者ID:CATACLYSMDEV,项目名称:JadeCore-5.4.8-18291--dev-,代码行数:38,


示例29: UpdateAI

        void UpdateAI(const uint32 uiDiff)        {            if (!UpdateVictim())                return;            if (RipTimer <= uiDiff)            {                DoCastVictim(SPELL_RIP_FLESH);                RipTimer = urand(14000, 18000);            }            else RipTimer -= uiDiff;            if (PounceTimer <= uiDiff)            {                if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 60, true))                {                    me->AddThreat(pTarget, 100.0f);                    me->AI()->AttackStart(pTarget);                    DoCast(pTarget, SPELL_SAVAGE_POUNCE);                }                PounceTimer = urand(20000, 30000);            }            else PounceTimer -= uiDiff;            // Increases the damage of all Sanctum Sentries within 10 yards by 30%            if (CheckTimer < uiDiff)            {                uint8 aura = NULL;                std::list<Creature*> Sanctum;                GetCreatureListWithEntryInGrid(Sanctum, me, NPC_SANCTUM_SENTRY, 10.0f);                for(std::list<Creature*>::iterator itr = Sanctum.begin(); itr != Sanctum.end(); ++itr)                {                    Creature *Sentry = *itr;                    if (!Sentry)                        continue;                    if (Sentry->isAlive() && me != Sentry)                        aura++;                }                if (aura)                    me->SetAuraStack(SPELL_STRENGHT_PACK, me, aura);                CheckTimer = 2000;            }            else CheckTimer -= uiDiff;            DoMeleeAttackIfReady();        }
开发者ID:vanasis,项目名称:MadboxpcWOW-core-,代码行数:50,


示例30: GOUse_go_scourge_enclosure

bool GOUse_go_scourge_enclosure(Player* pPlayer, GameObject* pGo){    std::list<Creature*> m_lResearchersList;    GetCreatureListWithEntryInGrid(m_lResearchersList, pGo, NPC_GYMER_LOCK_DUMMY, 15.0f);    if (!m_lResearchersList.empty())    {        for(std::list<Creature*>::iterator itr = m_lResearchersList.begin(); itr != m_lResearchersList.end(); ++itr)        {            (*itr)->CastSpell((*itr),SPELL_GYMER_LOCK_EXPLOSION,true);        }    }    pPlayer->KilledMonsterCredit(NPC_GYMER_LOCK_DUMMY);    return true;}
开发者ID:Bearq,项目名称:mangos,代码行数:14,



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


C++ GetCrossHairPosition函数代码示例
C++ GetCreatureInfo函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。