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


C++ instance_naxxramas::GetChamberCenterCoords方法代码示例

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


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

示例1: SummonIntroCreatures

    void SummonIntroCreatures(uint32 packId)
    {
        if (!m_pInstance)
            return;

        float fAngle = GetLocationAngle(packId + 1);

        float fX, fY, fZ;
        m_pInstance->GetChamberCenterCoords(fX, fY, fZ);

        fX += M_F_RANGE * cos(fAngle);
        fY += M_F_RANGE * sin(fAngle);
        fZ += M_F_HEIGHT;

        MaNGOS::NormalizeMapCoord(fX);
        MaNGOS::NormalizeMapCoord(fY);

        uint32 uiNpcEntry = NPC_SOUL_WEAVER;

        for (uint8 uiI = 0; uiI < 14; ++uiI)
        {
            if (uiI > 0)
            {
                if (uiI < 4)
                    uiNpcEntry = NPC_UNSTOPPABLE_ABOM;
                else
                    uiNpcEntry = NPC_SOLDIER_FROZEN;
            }

            float fNewX, fNewY, fNewZ;
            m_creature->GetRandomPoint(fX, fY, fZ, 12.0f, fNewX, fNewY, fNewZ);

            m_creature->SummonCreature(uiNpcEntry, fNewX, fNewY, fNewZ, fAngle + M_PI_F, TEMPSPAWN_CORPSE_DESPAWN, 5000);
        }
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:35,代码来源:boss_kelthuzad.cpp

示例2: SummonMob

    void SummonMob(uint32 uiType)
    {
        if (!m_pInstance)
            return;

        float fAngle = GetLocationAngle(urand(1, 7));

        float fX, fY, fZ;
        m_pInstance->GetChamberCenterCoords(fX, fY, fZ);

        fX += M_F_RANGE * cos(fAngle);
        fY += M_F_RANGE * sin(fAngle);
        fZ += M_F_HEIGHT;

        MaNGOS::NormalizeMapCoord(fX);
        MaNGOS::NormalizeMapCoord(fY);

        m_creature->SummonCreature(uiType, fX, fY, fZ, 0.0f, TEMPSPAWN_CORPSE_DESPAWN, 5000);
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:19,代码来源:boss_kelthuzad.cpp

示例3: JustSummoned

    void JustSummoned(Creature* pSummoned) override
    {
        switch (pSummoned->GetEntry())
        {
            case NPC_GUARDIAN:
            {
                DoScriptText(EMOTE_GUARDIAN, m_creature);

                m_lAddsSet.insert(pSummoned->GetObjectGuid());
                ++m_uiGuardiansCount;

                pSummoned->SetInCombatWithZone();
                break;
            }
            case NPC_SOLDIER_FROZEN:
            case NPC_UNSTOPPABLE_ABOM:
            case NPC_SOUL_WEAVER:
            {
                if (m_uiIntroPackCount < 7)
                    m_lIntroMobsSet.insert(pSummoned->GetObjectGuid());
                else
                {
                    m_lAddsSet.insert(pSummoned->GetObjectGuid());

                    if (m_pInstance)
                    {
                        float fX, fY, fZ;
                        m_pInstance->GetChamberCenterCoords(fX, fY, fZ);
                        pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ);
                    }
                }

                break;
            }
        }
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:36,代码来源:boss_kelthuzad.cpp


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