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


C++ ObjectGuid::Clear方法代码示例

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


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

示例1: DoDespawnPursuingSpikes

    // Wrapper to despawn the Spikes
    void DoDespawnPursuingSpikes()
    {
        if (Creature* pPursuingSpikes = m_creature->GetMap()->GetCreature(m_PursuingSpikesGuid))
            pPursuingSpikes->ForcedDespawn();

        m_PursuingSpikesGuid.Clear();
    }
开发者ID:Celtus,项目名称:custom-core2,代码行数:8,代码来源:boss_anubarak_trial.cpp

示例2: Reset

    void Reset() override
    {
        m_uiSaluteTimer = 0;
        m_uiResetTimer = 0;

        m_playerGuid.Clear();
    }
开发者ID:natedahl32,项目名称:portalclassic,代码行数:7,代码来源:orgrimmar.cpp

示例3: Reset

    void Reset() override
    {
        m_doctorGuid.Clear();
        m_pCoord = nullptr;

        // no select
        m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
        // no regen health
        m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
        // to make them lay with face down
        m_creature->SetStandState(UNIT_STAND_STATE_DEAD);

        switch (m_creature->GetEntry())
        {
                // lower max health
            case 12923:
            case 12938:                                     // Injured Soldier
                m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.75));
                break;
            case 12924:
            case 12936:                                     // Badly injured Soldier
                m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.50));
                break;
            case 12925:
            case 12937:                                     // Critically injured Soldier
                m_creature->SetHealth(uint32(m_creature->GetMaxHealth()*.25));
                break;
        }
    }
开发者ID:520lly,项目名称:mangos-classic,代码行数:29,代码来源:npcs_special.cpp

示例4: Reset

 void Reset() override
 {
     m_uiPhase = 0;
     m_uiPhaseTimer = 5000;
     SetReactState(REACT_AGGRESSIVE);
     m_playerGuid.Clear();
 }
开发者ID:killerwife,项目名称:mangos-tbc,代码行数:7,代码来源:tirisfal_glades.cpp

示例5: Reset

    void Reset() override
    {
        m_uiAcidBreathTimer         = 10000;
        m_uiNoxiousBreathTimer      = 3000;
        m_uiShadowboltVolleyTimer   = 5000;
        m_uiTyrandeMoveTimer        = 0;

        m_remulosGuid.Clear();
        m_tyrandeGuid.Clear();

        m_uiHealthCheck             = 85;
        m_uiEventPhase              = 0;
        m_uiEventTimer              = 0;

        // For some reason the boss doesn't move in combat
        SetCombatMovement(false);
    }
开发者ID:MantisLord,项目名称:mangos-tbc,代码行数:17,代码来源:moonglade.cpp

示例6: SummonedCreatureDespawn

 void SummonedCreatureDespawn(Creature* pSummoned) override
 {
     if (pSummoned->GetEntry() == NPC_WINDSOR)
     {
         m_windsorGuid.Clear();
         m_bIsEventInProgress = false;
     }
 }
开发者ID:Celtus,项目名称:custom-core2,代码行数:8,代码来源:stormwind_city.cpp

示例7: Reset

    void Reset() override
    {
        m_uiKnockBackTimer = urand(5000, 8000);
        m_playerGuid.Clear();

        if (!m_uiPhase)
            m_creature->SetStandState(UNIT_STAND_STATE_DEAD);
    }
开发者ID:520lly,项目名称:mangos-classic,代码行数:8,代码来源:felwood.cpp

示例8: Reset

    void Reset()
    {
        m_uiPhase = 0;
        m_uiPhaseTimer = 5000;
        m_playerGuid.Clear();

        if (m_creature->getFaction() != m_uiNormFaction)
            m_creature->setFaction(m_uiNormFaction);
    }
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:9,代码来源:tirisfal_glades.cpp

示例9: Reset

    void Reset()
    {
        m_creature->SetUInt32Value(UNIT_NPC_FLAGS, m_uiNpcFlags);

        m_playerGuid.Clear();
        m_creepjackGuid.Clear();
        m_maloneGuid.Clear();

        bEvent = false;
        bActiveAttack = false;

        m_uiSayTimer = 1000;
        m_uiStep = 0;

        //expect database to have correct faction (1194) and then only unit flags set/remove needed
        m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
        m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE);
    }
开发者ID:Shutok,项目名称:StrawberryCore-501Beta,代码行数:18,代码来源:shattrath_city.cpp

示例10: Reset

 void Reset() override
 {
     _Reset();
     _armDied = false;
     _ifLooks = true;
     _rubbleCount = 0;
     me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
     eyebeamTarget.Clear();
 }
开发者ID:shorden,项目名称:Core,代码行数:9,代码来源:boss_kologarn.cpp

示例11: DespawnBoatGhosts

        void DespawnBoatGhosts(ObjectGuid& CreatureGUID)
        {
            // @todo: fire visual after ancestor despawns.
            if (CreatureGUID)
                if (Creature* temp = ObjectAccessor::GetCreature(*me, CreatureGUID))
                    temp->DisappearAndDie();

            CreatureGUID.Clear();
        }
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:9,代码来源:boss_ymiron.cpp

示例12: UpdateAI

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

            DoMeleeAttackIfReady();

            if (ChaseTimer <= diff)
            {
                if (!IsChasing)
                {
                    if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
                    {
                        Talk(SAY_WOLF_HOOD);
                        DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true);
                        TempThreat = DoGetThreat(target);
                        if (TempThreat)
                            DoModifyThreatPercent(target, -100);
                        HoodGUID = target->GetGUID();
                        me->AddThreat(target, 1000000.0f);
                        ChaseTimer = 20000;
                        IsChasing = true;
                    }
                }
                else
                {
                    IsChasing = false;

                    if (Unit* target = ObjectAccessor::GetUnit(*me, HoodGUID))
                    {
                        HoodGUID.Clear();
                        if (DoGetThreat(target))
                            DoModifyThreatPercent(target, -100);
                        me->AddThreat(target, TempThreat);
                        TempThreat = 0;
                    }

                    ChaseTimer = 40000;
                }
            } else ChaseTimer -= diff;

            if (IsChasing)
                return;

            if (FearTimer <= diff)
            {
                DoCastVictim(SPELL_TERRIFYING_HOWL);
                FearTimer = urand(25000, 35000);
            } else FearTimer -= diff;

            if (SwipeTimer <= diff)
            {
                DoCastVictim(SPELL_WIDE_SWIPE);
                SwipeTimer = urand(25000, 30000);
            } else SwipeTimer -= diff;
        }
开发者ID:cooler-SAI,项目名称:ElunaTrinityWotlk,代码行数:56,代码来源:bosses_opera.cpp

示例13: UpdateAI

 void UpdateAI(const uint32 diff)
 {
     if (me->isSpawned() && cleansedGuid)
     {
         GameObject* cleansed = me->GetMap()->GetGameObject(cleansedGuid);
         if (cleansed)
             cleansed->AddObjectToRemoveList();
         cleansedGuid.Clear();
     }
 }
开发者ID:Maduse,项目名称:server,代码行数:10,代码来源:felwood.cpp

示例14: Reset

    void Reset() override
    {
        m_targetGuid.Clear();

        m_uiFearTimer          = urand(11000, 29000);
        m_uiRibbonOfSoulsTimer = urand(4000, 8000);
        m_uiStolenSoulTimer    = urand(19000, 31000);

        m_bHasSummonedAvatar = false;
    }
开发者ID:killerwife,项目名称:mangos-tbc,代码行数:10,代码来源:boss_exarch_maladaar.cpp

示例15: WaypointStart

 void WaypointStart(uint32 uiPointId)
 {
     if (uiPointId == 30)
     {
         if (GameObject* pBogbeanPlant = m_creature->GetMap()->GetGameObject(m_bogbeanPlantGuid))
             pBogbeanPlant->Use(m_creature);
         m_bogbeanPlantGuid.Clear();
         m_creature->HandleEmote(EMOTE_ONESHOT_NONE);
     }
 }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:10,代码来源:dustwallow_marsh.cpp


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