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


C++ DoRespawnGameObject函数代码示例

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


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

示例1: SetData

    void SetData(uint32 uiType, uint32 uiData)
    {
        debug_log("SD2: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData);

        switch(uiType)
        {
            case TYPE_VAZRUDEN:
                if (uiData == DONE && m_auiEncounter[1] == DONE)
                    DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILISECONDS);
                m_auiEncounter[0] = uiData;
                break;
            case TYPE_NAZAN:
                if (uiData == SPECIAL)
                {
                    ++m_uiSentryCounter;

                    if (m_uiSentryCounter == 2)
                        m_auiEncounter[1] = uiData;
                }
                if (uiData == DONE && m_auiEncounter[0] == DONE)
                {
                    DoRespawnGameObject(instance->IsRegularDifficulty() ? m_uiChestNGUID : m_uiChestHGUID, HOUR*IN_MILISECONDS);
                    m_auiEncounter[1] = uiData;
                }
                if (uiData == IN_PROGRESS)
                    m_auiEncounter[1] = uiData;
                break;
        }
    }
开发者ID:FLaM666,项目名称:evo-X,代码行数:29,代码来源:instance_hellfire_ramparts.cpp

示例2: debug_log

void instance_ramparts::SetData(uint32 uiType, uint32 uiData)
{
    debug_log("SD2: Instance Ramparts: SetData received for type %u with data %u",uiType,uiData);

    switch (uiType)
    {
        case TYPE_VAZRUDEN:
            if (uiData == DONE && m_auiEncounter[1] == DONE)
                DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_FEL_IRON_CHEST : GO_FEL_IRON_CHEST_H, HOUR);
            if (uiData == FAIL && m_auiEncounter[0] != FAIL)
                DoFailVazruden();
            m_auiEncounter[0] = uiData;
            break;
        case TYPE_NAZAN:
            if (uiData == SPECIAL)
            {
                ++m_uiSentryCounter;

                if (m_uiSentryCounter == 2)
                    m_auiEncounter[1] = uiData;

                return;
            }
            if (uiData == DONE && m_auiEncounter[0] == DONE)
                DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_FEL_IRON_CHEST : GO_FEL_IRON_CHEST_H, HOUR);
            if (uiData == FAIL && m_auiEncounter[1] != FAIL)
                DoFailVazruden();

            m_auiEncounter[1] = uiData;
            break;
    }
}
开发者ID:przemratajczak,项目名称:scriptdev2,代码行数:32,代码来源:instance_hellfire_ramparts.cpp

示例3: SetData

    void SetData(uint32 uiType, uint32 uiData)
    {
        switch(uiType)
        {
            case TYPE_MALYGOS:
                m_auiEncounter[0] = uiData;
                if(uiData == DONE)
                {
                    DoRespawnGameObject(m_uiGiftGUID, 30*MINUTE);
					DoRespawnGameObject(m_uiGiftHeroGUID, 30*MINUTE);
                }
                break;
            case TYPE_OUTRO_CHECK:
                m_uiOutroCheck = uiData;
                break;
        }
        OUT_SAVE_INST_DATA;
        std::ostringstream saveStream;
        saveStream << m_auiEncounter[0] << " " << m_uiOutroCheck;

        strInstData = saveStream.str();
        SaveToDB();
        OUT_SAVE_INST_DATA_COMPLETE;

    }
开发者ID:Apple15,项目名称:AppleCore,代码行数:25,代码来源:instance_eye_of_eternity.cpp

示例4: GetPlayerInMap

void instance_sunken_temple::DoSpawnAtalarionIfCan()
{
    // Return if already summoned
    if (GetSingleCreatureFromStorage(NPC_ATALARION))
    {
        return;
    }

    Player* pPlayer = GetPlayerInMap();
    if (!pPlayer)
    {
        return;
    }

    pPlayer->SummonCreature(NPC_ATALARION, aSunkenTempleLocation[0].m_fX, aSunkenTempleLocation[0].m_fY, aSunkenTempleLocation[0].m_fZ, aSunkenTempleLocation[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0);

    // Spawn the idol of Hakkar
    DoRespawnGameObject(GO_IDOL_OF_HAKKAR, 30 * MINUTE);

    // Spawn the big green lights
    for (GuidList::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr)
    {
        DoRespawnGameObject(*itr, 30 * MINUTE);
    }
}
开发者ID:haidusg,项目名称:scripts,代码行数:25,代码来源:instance_sunken_temple.cpp

示例5: SetBossState

        bool SetBossState(uint32 type, EncounterState state)
        {
            if (!InstanceScript::SetBossState(type, state))
                return false;

            switch (type)
            {
            case DATA_DRAKOS_EVENT:
                if (state == DONE)
                {
                    DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW,1);
                    DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT,centrifugueConstructCounter);
                    OpenCageDoors();
                }
                break;
            case DATA_VAROS_EVENT:
                if (state == DONE)
                    DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW,0);
                break;
            case DATA_EREGOS_EVENT:
                if (state == DONE)
                {
                    DoRespawnGameObject(eregosCache, 1*DAY);
                    DoRespawnGameObject(Rampenlicht, 1*DAY);
                }
                break;
            }

            return true;
        }
开发者ID:Nedj,项目名称:TrinityCore,代码行数:30,代码来源:instance_oculus.cpp

示例6: switch

void instance_oculus::SetData(uint32 uiType, uint32 uiData)
{
    m_auiEncounter[uiType] = uiData;
    switch(uiType)
    {
        case TYPE_DRAKOS:
            if (uiData == DONE)
            {
                if (!instance->IsRegularDifficulty())
                    DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_MAKE_IT_COUNT);
                CheckVarosCentrifugeConstructState();
            }
            break;
        case TYPE_VAROS:
            if (uiData == DONE)
            {
                if (Creature* pUrom = GetSingleCreatureFromStorage(NPC_UROM))
                {
                    pUrom->InterruptNonMeleeSpells(false);
                    pUrom->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                }
            }
            break;
        case TYPE_UROM:
            if (uiData == DONE)
            {
                if (Creature* pEregos = GetSingleCreatureFromStorage(NPC_EREGOS))
                {
                    pEregos->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                }
            }
            break;
        case TYPE_EREGOS:
            if (uiData == DONE)
            {
                DoRespawnGameObject(instance->IsRegularDifficulty() ? GO_EREGOS_CACHE : GO_EREGOS_CACHE_H, 30*MINUTE);
                DoRespawnGameObject(GO_SPOTLIGHT, 30*MINUTE);
            }
            break;        
        default:
            break;
    }

    // Saving also SPECIAL for this instance
    if (uiData == DONE)
    {
        OUT_SAVE_INST_DATA;

        std::ostringstream saveStream;
        saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3];

        m_strInstData = saveStream.str();

        SaveToDB();
        OUT_SAVE_INST_DATA_COMPLETE;
    }
}
开发者ID:Reamer,项目名称:scriptdev2,代码行数:57,代码来源:instance_oculus.cpp

示例7: switch

void instance_oculus::SetData(uint32 type, uint32 data)
{
    switch(type)
    {
        case TYPE_DRAKOS:
            m_auiEncounter[type] = data;
            if (data == IN_PROGRESS)
                DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_EREGOS_ID);
            break;
        case TYPE_VAROS:
        case TYPE_UROM:
            m_auiEncounter[type] = data;
            break;
        case TYPE_EREGOS:
            m_auiEncounter[type] = data;
            if (data == DONE)
            {
                DoRespawnGameObject(m_bIsRegularMode ? GO_EREGOS_CACHE : GO_EREGOS_CACHE_H, HOUR);
                DoRespawnGameObject(GO_SPOTLIGHT, HOUR);
            }
            break;
        case TYPE_ROBOTS:
            m_auiEncounter[type] = m_auiEncounter[type] - data;
            if(m_auiEncounter[type] == 0)
            {
                if(Creature* pVaros = GetSingleCreatureFromStorage(NPC_VAROS))
                {
                    DoScriptText(SAY_VAROS_SPAWN, pVaros);
                    pVaros->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                    pVaros->InterruptNonMeleeSpells(false);
                    pVaros->RemoveAurasDueToSpell(50053);
                }
            }
            data = NOT_STARTED;
            break;
        case TYPE_UROM_PHASE:
            m_auiEncounter[type] = data;
            data = NOT_STARTED;
            break;
        default:
            return;
    }

    if (data == DONE)
    {
        OUT_SAVE_INST_DATA;
        std::ostringstream saveStream;
        for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
            saveStream << m_auiEncounter[i] << " ";

        strSaveData = saveStream.str();

        SaveToDB();
        OUT_SAVE_INST_DATA_COMPLETE;
    }
}
开发者ID:przemratajczak,项目名称:scriptdev2,代码行数:56,代码来源:instance_oculus.cpp

示例8: SetData

    void SetData(uint32 uiType, uint32 uiData)
    {
        switch(uiType)
        {
            case DATA_CHAMPIONID_1:
                m_uiChampionId1 = uiData;
                break;
            case DATA_CHAMPIONID_2:
                m_uiChampionId2 = uiData;
                break;
            case DATA_CHAMPIONID_3:
                m_uiChampionId3 = uiData;
                break;
            case DATA_ARGENT_CHALLENGER:
                m_uiArgentChallengerID = uiData;
                break;
            case DATA_BLACK_KNIGHT_MINION:
                m_uiBlackKnightMinionID = uiData;
                break;
            case TYPE_GRAND_CHAMPIONS:
                m_auiEncounter[0] = uiData;
                if (uiData == DONE && m_uiChampionsLootGUID)
                    DoRespawnGameObject(m_uiChampionsLootGUID, 7*DAY);
                break;
            case TYPE_ARGENT_CHALLENGE:
                m_auiEncounter[1] = uiData;
                if (uiData == DONE)
                {
                    if (m_uiArgentChallenger == m_uiEadricGUID && m_uiEadricLootGUID)
                        DoRespawnGameObject(m_uiEadricLootGUID, 7*DAY);
                    if (m_uiArgentChallenger == m_uiPaletressGUID && m_uiPaletressLootGUID)
                        DoRespawnGameObject(m_uiPaletressLootGUID, 7*DAY);
                }
                break;
            case TYPE_BLACK_KNIGHT:
                m_auiEncounter[2] = uiData;
                break;
        }

        std::ostringstream saveStream;
        for(uint32 i = 0; i < MAX_ENCOUNTER; ++i)   //FIXME: should save more stuff to properly load in case of crash
            saveStream << m_auiEncounter[i] << " ";
        m_strInstData = saveStream.str();

        if (uiData == DONE)
        {
            OUT_SAVE_INST_DATA;
            SaveToDB();
            OUT_SAVE_INST_DATA_COMPLETE;
        }
    }
开发者ID:Archives,项目名称:pwow_scriptdev2,代码行数:51,代码来源:instance_trial_of_the_champion.cpp

示例9: SetData

    void SetData(uint32 uiType, uint32 uiData)
    {
        switch(uiType)
        {
            case TYPE_MALYGOS:
            {
                if (uiData == NOT_STARTED)
                {
                    if (GameObject* pFocusingIris = GetSingleGameObjectFromStorage(m_uiFocusingIrisActualEntry))
                    {
                        pFocusingIris->SetGoState(GO_STATE_READY);
                        pFocusingIris->SetPhaseMask(1, true);
                    }
                    if (GameObject* pExitPortal = GetSingleGameObjectFromStorage(GO_EXIT_PORTAL))
                        pExitPortal->SetPhaseMask(1, true);
                    if (GameObject* pPlatform = GetSingleGameObjectFromStorage(GO_PLATFORM))
                        pPlatform->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
                }
                if (uiData == IN_PROGRESS)
                {
                    if (GameObject* pFocusingIris = GetSingleGameObjectFromStorage(m_uiFocusingIrisActualEntry))
                        pFocusingIris->SetPhaseMask(2, true);
                    if (GameObject* pExitPortal = GetSingleGameObjectFromStorage(GO_EXIT_PORTAL))
                        pExitPortal->SetPhaseMask(2, true);
                }
                if (uiData == DONE)
                {
                    if (GameObject* pExitPortal = GetSingleGameObjectFromStorage(GO_EXIT_PORTAL))
                        pExitPortal->SetPhaseMask(1, true);
                    DoRespawnGameObject(m_uiGiftActualGuid, HOUR*IN_MILLISECONDS);
                    DoRespawnGameObject(m_uiHeartActualGuid, HOUR*IN_MILLISECONDS);
                    //hack to make loot accessible
                    if (GameObject* pPlatform = GetSingleGameObjectFromStorage(GO_PLATFORM))
                    {
                        pPlatform->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
                        pPlatform->Respawn();
                    }
                }
                m_auiEncounter[0] = uiData;
                break;
            }
        }
        OUT_SAVE_INST_DATA;
        std::ostringstream saveStream;
        saveStream << m_auiEncounter[0];

        strInstData = saveStream.str();
        SaveToDB();
        OUT_SAVE_INST_DATA_COMPLETE;

    }
开发者ID:chiodino92,项目名称:scriptdev2,代码行数:51,代码来源:instance_eye_of_eternity.cpp

示例10: debug_log

void instance_karazhan::DoPrepareOperaStage(Creature* pOrganizer)
{
    if (!pOrganizer)
        return;

    debug_log("SD2: Barnes Opera Event - Introduction complete - preparing encounter %d", GetData(TYPE_OPERA_PERFORMANCE));

    // summon the bosses and respawn the stage background
    switch (GetData(TYPE_OPERA_PERFORMANCE))
    {
        case OPERA_EVENT_WIZARD_OZ:
            for (uint8 i = 0; i < MAX_OZ_OPERA_MOBS; ++i)
                pOrganizer->SummonCreature(aOperaLocOz[i].uiEntry, aOperaLocOz[i].fX, aOperaLocOz[i].fY, aOperaLocOz[i].fZ, aOperaLocOz[i].fO, TEMPSPAWN_DEAD_DESPAWN, 0);
            DoRespawnGameObject(GO_OZ_BACKDROP, 12 * HOUR);
            for (GuidList::const_iterator itr = m_lOperaHayGuidList.begin(); itr != m_lOperaHayGuidList.end(); ++itr)
                DoRespawnGameObject(*itr, 12 * HOUR);
            break;
        case OPERA_EVENT_RED_RIDING_HOOD:
            pOrganizer->SummonCreature(aOperaLocWolf.uiEntry, aOperaLocWolf.fX, aOperaLocWolf.fY, aOperaLocWolf.fZ, aOperaLocWolf.fO, TEMPSPAWN_DEAD_DESPAWN, 0);
            DoRespawnGameObject(GO_HOOD_BACKDROP, 12 * HOUR);
            DoRespawnGameObject(GO_HOOD_HOUSE,    12 * HOUR);
            for (GuidList::const_iterator itr = m_lOperaTreeGuidList.begin(); itr != m_lOperaTreeGuidList.end(); ++itr)
                DoRespawnGameObject(*itr, 12 * HOUR);
            break;
        case OPERA_EVENT_ROMULO_AND_JUL:
            pOrganizer->SummonCreature(aOperaLocJul.uiEntry, aOperaLocJul.fX, aOperaLocJul.fY, aOperaLocJul.fZ, aOperaLocJul.fO, TEMPSPAWN_DEAD_DESPAWN, 0);
            DoRespawnGameObject(GO_RAJ_BACKDROP, 12 * HOUR);
            DoRespawnGameObject(GO_RAJ_MOON,     12 * HOUR);
            DoRespawnGameObject(GO_RAJ_BALCONY,  12 * HOUR);
            break;
    }

    SetData(TYPE_OPERA, IN_PROGRESS);
}
开发者ID:killerwife,项目名称:mangos-tbc,代码行数:34,代码来源:instance_karazhan.cpp

示例11: TombOfSevenEnd

		void TombOfSevenEnd() {
			DoRespawnGameObject(GoChestGUID, DAY);
			HandleGameObject(GoTombExitGUID, true); //event done, open exit door
			HandleGameObject(GoTombEnterGUID, true); //event done, open entrance door
			TombEventStarterGUID = 0;
			SetData(TYPE_TOMB_OF_SEVEN, DONE);
		}
开发者ID:Bootz,项目名称:DeepshjirRepack,代码行数:7,代码来源:instance_blackrock_depths.cpp

示例12: SetData

 void SetData(uint32 uiType, uint32 uiData)
 {
     switch(uiType)
     {
         case TYPE_QUEST:
             m_auiEncounter[0] = uiData;
             break; 
         case TYPE_CRATES_COUNT:
             m_uiCratesCount = m_uiCratesCount + uiData;
             if(m_uiCratesCount == 5)
             {
                m_auiEncounter[0] = DONE;
                ChromiWhispers();
             }
             DoUpdateWorldState(WORLD_STATE_COS_CRATE_COUNT, m_uiCratesCount);
             break;
         case TYPE_INTRO:
             m_auiEncounter[1] = uiData;
             break;
         case TYPE_PHASE:
             m_auiEncounter[2] = uiData;
             break;
         case TYPE_ENCOUNTER:
             m_auiEncounter[3] = uiData;
             break;
         case TYPE_WING:
             m_auiEncounter[4] = uiData;
             break;
         case TYPE_BONUS:
             m_auiEncounter[5] = uiData;
             if(uiData == IN_PROGRESS)
             {
               if(Creature* Corruptor = GetSingleCreatureFromStorage(NPC_INFINITE_CORRUPTOR))
                  Corruptor->SetPhaseMask(1, true);
               DoUpdateWorldState(WORLD_STATE_COS_TIME_ON, 1);
               DoUpdateWorldState(WORLD_STATE_COS_TIME_COUNT, 25);  
             } 
             break;
         case TYPE_MALGANIS:
             m_auiEncounter[6] = uiData;
             if (uiData == DONE)
             {
                 DoRespawnGameObject(m_uiMalChestGUID, 30*MINUTE);
                 if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_MALGANIS_CHEST))
                     pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
                 if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_MALGANIS_CHEST_H))
                     pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);                    
                 if (Creature* pChromi2 = GetSingleCreatureFromStorage(NPC_CHROMI02))
                     pChromi2->SetVisibility(VISIBILITY_OFF);
                 if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_EXIT))
                     pGo->SetGoState(GO_STATE_ACTIVE);
             }
             break;
         case TYPE_ZOMBIEFEST:
             {
                 if(!m_bZombiefestInProgress)                   
                     m_bZombiefestInProgress = true;
             }
     }
 }
开发者ID:przemratajczak,项目名称:scriptdev2,代码行数:60,代码来源:instance_culling_of_stratholme.cpp

示例13: SetBossState

        bool SetBossState(uint32 type, EncounterState state) override
        {
            if (!InstanceScript::SetBossState(type, state))
                return false;

            switch (type)
            {
                case DATA_OPERA_PERFORMANCE:
                    if (state == DONE)
                    {
                        HandleGameObject(StageDoorLeftGUID, true);
                        HandleGameObject(StageDoorRightGUID, true);
                        if (GameObject* sideEntrance = instance->GetGameObject(SideEntranceDoor))
                            sideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
                        UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, 16812, NULL);
                    }
                    break;
                case DATA_CHESS:
                    if (state == DONE)
                        DoRespawnGameObject(DustCoveredChest, DAY);
                    break;
                default:
                    break;
            }

            return true;
        }
开发者ID:AvariusProject,项目名称:AvariusCore,代码行数:27,代码来源:instance_karazhan.cpp

示例14: SetData

    void SetData(uint32 uiType, uint32 uiData)
    {
        switch(uiType)
        {
            case TYPE_TRIBUNAL:
                m_auiEncounter[0] = uiData;
                if (uiData == DONE)
                    DoRespawnGameObject(m_uiTribunalChestGUID);
                break;
            case TYPE_MAIDEN:
                m_auiEncounter[1] = uiData;
                break;
            case TYPE_KRYSTALLUS:
                m_auiEncounter[2] = uiData;
                break;
            case TYPE_SJONNIR:
                m_auiEncounter[3] = uiData;
                break;
        }

        // should be opened by Brann Bronzebeard in escort event
        if (m_auiEncounter[1] == DONE && m_auiEncounter[2] == DONE)
        {
            if (GameObject *pGo = instance->GetGameObject(m_uiSjonnirDoorGUID))
                pGo->SetGoState(GO_STATE_ACTIVE);
        }
    }
开发者ID:Bearq,项目名称:mangos,代码行数:27,代码来源:instance_halls_of_stone.cpp

示例15: DoRespawnGameObject

void instance_wailing_caverns::OnPlayerEnter(Player* pPlayer)
{
    // Respawn the Mysterious chest if one of the players who enter the instance has the quest in his log
    if (pPlayer->GetQuestStatus(QUEST_FORTUNE_AWAITS) == QUEST_STATUS_COMPLETE &&
            !pPlayer->GetQuestRewardStatus(QUEST_FORTUNE_AWAITS))
        DoRespawnGameObject(GO_MYSTERIOUS_CHEST, HOUR);
}
开发者ID:SakhWoW,项目名称:blizzlikecore,代码行数:7,代码来源:instance_wailing_caverns.cpp


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