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


C++ SetFollowPaused函数代码示例

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


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

示例1: SetFaint

    void SetFaint()
    {
        if (!HasFollowState(STATE_FOLLOW_POSTEVENT))
        {
            SetFollowPaused(true);

            switch(urand(0, 3))
            {
            case 0:
                DoScriptText(SAY_FAINT_1, m_creature);
                break;
            case 1:
                DoScriptText(SAY_FAINT_2, m_creature);
                break;
            case 2:
                DoScriptText(SAY_FAINT_3, m_creature);
                break;
            case 3:
                DoScriptText(SAY_FAINT_4, m_creature);
                break;
            }
        }

        //what does actually happen here? Emote? Aura?
        m_creature->SetStandState(UNIT_STAND_STATE_SLEEP);
    }
开发者ID:bobazrh,项目名称:Bobaz-RH,代码行数:26,代码来源:ungoro_crater.cpp

示例2: ClearFaint

    void ClearFaint()
    {
        m_creature->SetStandState(UNIT_STAND_STATE_STAND);

        if (HasFollowState(STATE_FOLLOW_POSTEVENT))
            return;

        switch(urand(0, 3))
        {
        case 0:
            DoScriptText(SAY_WAKE_1, m_creature);
            break;
        case 1:
            DoScriptText(SAY_WAKE_2, m_creature);
            break;
        case 2:
            DoScriptText(SAY_WAKE_3, m_creature);
            break;
        case 3:
            DoScriptText(SAY_WAKE_4, m_creature);
            break;
        }

        SetFollowPaused(false);
    }
开发者ID:bobazrh,项目名称:Bobaz-RH,代码行数:25,代码来源:ungoro_crater.cpp

示例3: AddFollowState

void FollowerAI::MovementInform(uint32 uiMotionType, uint32 uiPointId)
{
    if (uiMotionType != POINT_MOTION_TYPE || !HasFollowState(STATE_FOLLOW_INPROGRESS))
        return;

    if (uiPointId == POINT_COMBAT_START)
    {
        if (GetLeaderForFollower())
        {
            if (!HasFollowState(STATE_FOLLOW_PAUSED))
                AddFollowState(STATE_FOLLOW_RETURNING);
        }
        else
        {
            // Ustaag <Nostalrius> : vilain fix des mobs qui voulaient pas respawn à leur point de spawn
            SetFollowPaused(false);
            float x = 0.0f;
            float y = 0.0f;
            float z = 0.0f;
            float o = 0.0f;
            m_creature->GetHomePosition(x, y, z, o);
            m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
            m_creature->NearTeleportTo(x, y, z, o);
            m_creature->ForcedDespawn();
        }
    }
}
开发者ID:Maduse,项目名称:server,代码行数:27,代码来源:ScriptedFollowerAI.cpp

示例4: UpdateFollowerAI

    void UpdateFollowerAI(const uint32 uiDiff)
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
        {
            if (m_uiWanderTimer)
            {
                if (m_uiWanderTimer <= uiDiff)
                {
                    // set follow paused and wander in a random point
                    SetFollowPaused(true);
                    DoScriptText(EMOTE_WANDER, m_creature);
                    m_uiWanderTimer = 0;

                    switch (urand(0, 3))
                    {
                        case 0: DoScriptText(SAY_WANDER_1, m_creature); break;
                        case 1: DoScriptText(SAY_WANDER_2, m_creature); break;
                        case 2: DoScriptText(SAY_WANDER_3, m_creature); break;
                        case 3: DoScriptText(SAY_WANDER_4, m_creature); break;
                    }

                    float fX, fY, fZ;
                    m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, frand(25.0f, 40.0f), frand(0, 2 * M_PI_F));
                    m_creature->GetMotionMaster()->MoveRandomAroundPoint(fX, fY, fZ, 20.0f);
                }
                else
                    m_uiWanderTimer -= uiDiff;
            }

            return;
        }

        DoMeleeAttackIfReady();
    }
开发者ID:natedahl32,项目名称:portalclassic,代码行数:34,代码来源:feralas.cpp

示例5: ClearSleeping

		void ClearSleeping() {
			me->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL);
			me->SetStandState(UNIT_STAND_STATE_STAND);

			DoScriptText(EMOTE_KER_AWAKEN, me);

			SetFollowPaused(false);
		}
开发者ID:FrenchCORE,项目名称:OLD_FrenchCORE,代码行数:8,代码来源:darkshore.cpp

示例6: ClearFaint

        void ClearFaint()
        {
            me->SetStandState(UNIT_STAND_STATE_STAND);

            if (HasFollowState(STATE_FOLLOW_POSTEVENT))
                return;

            DoScriptText(RAND(SAY_WAKE_1, SAY_WAKE_2, SAY_WAKE_3, SAY_WAKE_4), me);

            SetFollowPaused(false);
        }
开发者ID:Sharkss,项目名称:DiamondCore3,代码行数:11,代码来源:ungoro_crater.cpp

示例7: SetSleeping

        void SetSleeping()
        {
            SetFollowPaused(true);

            DoScriptText(RAND(EMOTE_KER_SLEEP_1, EMOTE_KER_SLEEP_2, EMOTE_KER_SLEEP_3), me);

            DoScriptText(RAND(SAY_KER_SLEEP_1, SAY_KER_SLEEP_2, SAY_KER_SLEEP_3, SAY_KER_SLEEP_4), me);

            me->SetStandState(UNIT_STAND_STATE_SLEEP);
            DoCast(me, SPELL_SLEEP_VISUAL, false);
        }
开发者ID:Bulbucan,项目名称:TrinityCore,代码行数:11,代码来源:darkshore.cpp

示例8: SetSleeping

        void SetSleeping()
        {
            SetFollowPaused(true);

            Talk(EMOTE_KER_SLEEP);

            Talk(SAY_KER_SLEEP);

            me->SetStandState(UNIT_STAND_STATE_SLEEP);
            DoCast(me, SPELL_SLEEP_VISUAL, false);
        }
开发者ID:kemlg,项目名称:trinitycore-conciens,代码行数:11,代码来源:zone_darkshore.cpp

示例9: ClearFaint

        void ClearFaint()
        {
            me->SetStandState(UNIT_STAND_STATE_STAND);

            if (HasFollowState(STATE_FOLLOW_POSTEVENT))
                return;

            Talk(SAY_WAKE);

            SetFollowPaused(false);
        }
开发者ID:AwkwardDev,项目名称:RE,代码行数:11,代码来源:zone_ungoro_crater.cpp

示例10: SetFaint

        void SetFaint()
        {
            if (!HasFollowState(STATE_FOLLOW_POSTEVENT))
            {
                SetFollowPaused(true);

                DoScriptText(RAND(SAY_FAINT_1, SAY_FAINT_2, SAY_FAINT_3, SAY_FAINT_4), me);
            }

            //what does actually happen here? Emote? Aura?
            me->SetStandState(UNIT_STAND_STATE_SLEEP);
        }
开发者ID:Sharkss,项目名称:DiamondCore3,代码行数:12,代码来源:ungoro_crater.cpp

示例11: SetFaint

        void SetFaint()
        {
            if (!HasFollowState(STATE_FOLLOW_POSTEVENT))
            {
                SetFollowPaused(true);

                Talk(SAY_FAINT);
            }

            //what does actually happen here? Emote? Aura?
            me->SetStandState(UNIT_STAND_STATE_SLEEP);
        }
开发者ID:AwkwardDev,项目名称:RE,代码行数:12,代码来源:zone_ungoro_crater.cpp

示例12: ReceiveAIEvent

 void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override
 {
     // start following
     if (eventType == AI_EVENT_START_EVENT && pInvoker->GetTypeId() == TYPEID_PLAYER)
     {
         StartFollow((Player*)pInvoker, 0, GetQuestTemplateStore(uiMiscValue));
         m_uiWanderTimer = 30000;
     }
     else if (eventType == AI_EVENT_CUSTOM_A)
     {
         // resume following
         m_bIsRecalled = true;
         SetFollowPaused(false);
     }
 }
开发者ID:natedahl32,项目名称:portalclassic,代码行数:15,代码来源:feralas.cpp

示例13: npc_kittenAI

    npc_kittenAI(Creature* pCreature) : FollowerAI(pCreature)
    {
        if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER)
        {
            StartFollow((Player*)pCreature->GetOwner());
            SetFollowPaused(true);
            DoScriptText(EMOTE_SAB_JUMP, m_creature);

            pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);

            // find a decent way to move to center of moonwell
        }

        m_uiMoonwellCooldown = 7500;
        Reset();
    }
开发者ID:520lly,项目名称:mangos-classic,代码行数:16,代码来源:felwood.cpp

示例14: UpdateFollowerAI

    void UpdateFollowerAI(const uint32 uiDiff) override
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
        {
            if (HasFollowState(STATE_FOLLOW_PAUSED))
            {
                if (m_uiMoonwellCooldown < uiDiff)
                {
                    m_creature->CastSpell(m_creature, SPELL_CORRUPT_SABER_VISUAL, false);
                    SetFollowPaused(false);
                }
                else
                    m_uiMoonwellCooldown -= uiDiff;
            }

            return;
        }

        DoMeleeAttackIfReady();
    }
开发者ID:520lly,项目名称:mangos-classic,代码行数:20,代码来源:felwood.cpp

示例15: SetSleeping

    void SetSleeping()
    {
        SetFollowPaused(true);

        switch (urand(0, 2))
        {
            case 0: DoScriptText(EMOTE_KER_SLEEP_1, m_creature); break;
            case 1: DoScriptText(EMOTE_KER_SLEEP_2, m_creature); break;
            case 2: DoScriptText(EMOTE_KER_SLEEP_3, m_creature); break;
        }

        switch (urand(0, 3))
        {
            case 0: DoScriptText(SAY_KER_SLEEP_1, m_creature); break;
            case 1: DoScriptText(SAY_KER_SLEEP_2, m_creature); break;
            case 2: DoScriptText(SAY_KER_SLEEP_3, m_creature); break;
            case 3: DoScriptText(SAY_KER_SLEEP_4, m_creature); break;
        }

        m_creature->SetStandState(UNIT_STAND_STATE_SLEEP);
        m_creature->CastSpell(m_creature, SPELL_SLEEP_VISUAL, false);
    }
开发者ID:DarkSunRise,项目名称:scriptdev0,代码行数:22,代码来源:darkshore.cpp


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