• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GetSingleGameObjectFromStorage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: SetData

    void SetData(uint32 uiType, uint32 uiData)
    {
        if (uiType == TYPE_OMEN)
        {
            switch (uiData)
            {
                case NOT_STARTED:
                    // Count another rocket cluster launched
                    m_uiRocketsCounter++;
                    if (m_uiRocketsCounter < MAX_ROCKETS)
                    {
                        // 25% chance of spawning Minions of Omen (guessed), only if not already spawned (encounter is set to FAIL in that case)
                        if (GetData(TYPE_OMEN) == NOT_STARTED && urand(0, 1) < 1)
                            SetData(TYPE_OMEN, SPECIAL); // This will notify the GO to summon Omen's minions
                    }
                    // Set the event in motion and notify the GO to summon Omen
                    else if (GetData(TYPE_OMEN) != IN_PROGRESS && GetData(TYPE_OMEN) != DONE)   // Check that Omen is not already spawned and event is reset
                        SetData(TYPE_OMEN, IN_PROGRESS);

                    return; // Don't store NOT_STARTED data unless explicitly told so: we use it to count rockets
                case SPECIAL:
                    if (GameObject* pRocketCluster = GetSingleGameObjectFromStorage(GO_ROCKET_CLUSTER))
                    {
                        for (uint8 i = POS_IDX_MINION_OMEN_START ; i <= POS_IDX_MINION_OMEN_STOP ; i++)
                            pRocketCluster->SummonCreature(NPC_MINION_OMEN, aSpawnLocations[i][0], aSpawnLocations[i][1], aSpawnLocations[i][2], aSpawnLocations[i][3], TEMPSPAWN_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS);
                    }
                    break;
                case IN_PROGRESS:
                    if (GameObject* pRocketCluster = GetSingleGameObjectFromStorage(GO_ROCKET_CLUSTER))
                    {
                        if (Creature* pOmen = pRocketCluster->SummonCreature(NPC_OMEN, aSpawnLocations[POS_IDX_OMEN_SPAWN][0], aSpawnLocations[POS_IDX_OMEN_SPAWN][1], aSpawnLocations[POS_IDX_OMEN_SPAWN][2], aSpawnLocations[POS_IDX_OMEN_SPAWN][3], TEMPSPAWN_TIMED_OOC_OR_DEAD_DESPAWN, 15 * MINUTE * IN_MILLISECONDS))
                        {
                            // Moving him to the lake bank
                            pOmen->SetWalk(true);
                            pOmen->GetMotionMaster()->MovePoint(1, aSpawnLocations[POS_IDX_OMEN_MOVE][0], aSpawnLocations[POS_IDX_OMEN_MOVE][1], aSpawnLocations[POS_IDX_OMEN_MOVE][2]);
                            m_uiOmenResetTimer = 15 * MINUTE * IN_MILLISECONDS; // Reset after 15 minutes if not engaged or defeated
                        }
                    }
                    break;
                case DONE:
                    m_uiOmenMoonlightTimer = 5 * IN_MILLISECONDS;            // Timer before casting the end quest spell
                    m_uiOmenResetTimer = 5 * MINUTE * IN_MILLISECONDS;       // Prevent another summoning of Omen for 5 minutes (based on spell duration)
                    break;
            }
        }
        else if (uiType == TYPE_HIVE)
        {
            if (uiData == IN_PROGRESS)
            	m_uiDronesTimer = 5 * MINUTE * IN_MILLISECONDS;
        }
        m_encounter[uiType] = uiData;
    }
开发者ID:cmangos,项目名称:mangos-wotlk,代码行数:52,代码来源:world_map_scripts.cpp


示例3: switch

void instance_razorfen_downs::OnCreatureDeath(Creature* pCreature)
{
    // Only use this function if gong event is in progress
    if (GetData(TYPE_TUTEN_KASH) != IN_PROGRESS)
        return;

    switch (pCreature->GetEntry())
    {
        case NPC_TOMB_FIEND:
        case NPC_TOMB_REAVER:
            m_lSpawnedMobsList.remove(pCreature->GetObjectGuid());

            // No more wave-mobs around, enable the gong for the next wave
            if (m_lSpawnedMobsList.empty())
            {
                if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_GONG))
                {
                    pGo->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT);

                    // Workaround - GO need to be respawned - requires core fix, GO shouldn't despawn in the first place
                    pGo->Respawn();
                }
            }
            break;
        case NPC_TUTEN_KASH:
            SetData(TYPE_TUTEN_KASH, DONE);
            break;
    }
}
开发者ID:cala,项目名称:mangos-classic,代码行数:29,代码来源:instance_razorfen_downs.cpp


示例4: IsInRightSideGothArea

// Right is right side from gothik (eastern)
bool instance_naxxramas::IsInRightSideGothArea(Unit* pUnit)
{
    if (GameObject* pCombatGate = GetSingleGameObjectFromStorage(GO_MILI_GOTH_COMBAT_GATE))
        return (pCombatGate->GetPositionY() >= pUnit->GetPositionY());

    error_log("SSC: left/right side check, Gothik combat area failed.");
    return true;
}
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:9,代码来源:instance_naxxramas.cpp


示例5: DoOpenMadnessDoorIfCan

// Used in order to unlock the door to Vezax
void instance_ulduar::DoOpenMadnessDoorIfCan()
{
    if (m_auiEncounter[TYPE_MIMIRON] == DONE && m_auiEncounter[TYPE_HODIR] == DONE && m_auiEncounter[TYPE_THORIM] == DONE && m_auiEncounter[TYPE_FREYA] == DONE)
    {
        if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_ANCIENT_GATE))
            pDoor->SetGoState(GO_STATE_ACTIVE);
    }
}
开发者ID:Cluckyx,项目名称:scriptdev2,代码行数:9,代码来源:instance_ulduar.cpp


示例6: switch

void instance_molten_core::SetData(uint32 uiType, uint32 uiData)
{
    switch (uiType)
    {
        case TYPE_LUCIFRON:
            m_auiEncounter[uiType] = uiData;
            break;
        case TYPE_MAGMADAR:
        case TYPE_GEHENNAS:
        case TYPE_GARR:
        case TYPE_SHAZZRAH:
        case TYPE_GEDDON:
        case TYPE_GOLEMAGG:
        case TYPE_SULFURON:
            m_auiEncounter[uiType] = uiData;
            if (uiData == DONE)
            {
                for (auto m_aMoltenCoreRune : m_aMoltenCoreRunes)
                {
                    if (m_aMoltenCoreRune.m_uiType == uiType)
                    {
                        if (GameObject* pGo = GetSingleGameObjectFromStorage(m_aMoltenCoreRune.m_uiFlamesCircleEntry))
                            pGo->SetLootState(GO_JUST_DEACTIVATED);
                        break;
                    }
                }
            }
            break;
        case TYPE_MAJORDOMO:
            m_auiEncounter[uiType] = uiData;
            if (uiData == DONE)
                DoRespawnGameObject(GO_CACHE_OF_THE_FIRE_LORD, HOUR);
            break;
        case TYPE_RAGNAROS:
            m_auiEncounter[uiType] = uiData;
            break;
    }

    // Check if Majordomo can be summoned
    if (uiData == SPECIAL)
        DoSpawnMajordomoIfCan(false);

    if (uiData == DONE || uiData == SPECIAL)
    {
        OUT_SAVE_INST_DATA;

        std::ostringstream saveStream;
        saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " "
                   << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " "
                   << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " "
                   << m_auiEncounter[9];

        m_strInstData = saveStream.str();

        SaveToDB();
        OUT_SAVE_INST_DATA_COMPLETE;
    }
}
开发者ID:Ghaster,项目名称:mangos-classic,代码行数:58,代码来源:instance_molten_core.cpp


示例7: DoAltarVisualEffect

void instance_gundrak::DoAltarVisualEffect(uint8 uiType)
{
    // Sort the lists if not yet done
    if (!m_luiStalkerGUIDs.empty())
    {
        float fHeight = 10.0f;                              // A bit higher than the altar is needed
        if (GameObject* pCollusAltar = GetSingleGameObjectFromStorage(GO_ALTAR_OF_COLOSSUS))
            fHeight += pCollusAltar->GetPositionZ();

        std::list<Creature*> lStalkerTargets, lStalkerCasters;
        for (GuidList::const_iterator itr = m_luiStalkerGUIDs.begin(); itr != m_luiStalkerGUIDs.end(); ++itr)
        {
            if (Creature* pStalker = instance->GetCreature(*itr))
            {
                if (pStalker->GetPositionZ() > fHeight)
                    lStalkerTargets.push_back(pStalker);
                else
                    lStalkerCasters.push_back(pStalker);
            }
        }
        m_luiStalkerGUIDs.clear();

        lStalkerTargets.sort(sortFromEastToWest);
        lStalkerCasters.sort(sortFromEastToWest);

        for (std::list<Creature*>::const_iterator itr = lStalkerTargets.begin(); itr != lStalkerTargets.end(); ++itr)
            m_vStalkerTargetGuids.push_back((*itr)->GetObjectGuid());
        for (std::list<Creature*>::const_iterator itr = lStalkerCasters.begin(); itr != lStalkerCasters.end(); ++itr)
            m_vStalkerCasterGuids.push_back((*itr)->GetObjectGuid());
    }

    // Verify that the DB has enough trigger spawned
    if (m_vStalkerTargetGuids.size() < 3 || m_vStalkerCasterGuids.size() < 3)
        return;

    // Get the Index from the bosses
    uint8 uiIndex = 0;
    switch (uiType)
    {
        case TYPE_SLADRAN:  uiIndex = 0; break;
        case TYPE_COLOSSUS: uiIndex = 1; break;
        case TYPE_MOORABI:  uiIndex = 2; break;
        default:
            return;
    }

    Creature* pTarget = instance->GetCreature(m_vStalkerTargetGuids[uiIndex]);
    Creature* pCaster = instance->GetCreature(m_vStalkerCasterGuids[uiIndex]);

    if (!pTarget || !pCaster)
        return;

    uint32 auiFireBeamSpells[3] = {SPELL_BEAM_SNAKE, SPELL_BEAM_ELEMENTAL, SPELL_BEAM_MAMMOTH};

    // Cast from Caster to Target
    pCaster->CastSpell(pTarget, auiFireBeamSpells[uiIndex], TRIGGERED_NONE);
}
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:57,代码来源:instance_gundrak.cpp


示例8: SetData

void instance_blackwing_lair::SetData64(uint32 uiData, uint64 uiGuid)
{
    if (uiData == DATA_DRAGON_EGG)
    {
        if (GameObject* pEgg = instance->GetGameObject(ObjectGuid(uiGuid)))
            m_lUsedEggsGuids.push_back(pEgg->GetObjectGuid());

        // If all eggs are destroyed, then allow Razorgore to be attacked
        if (m_lUsedEggsGuids.size() == m_lDragonEggsGuids.size())
        {
				SetData(TYPE_RAZORGORE, SPECIAL);

                if (GameObject* Orb = GetSingleGameObjectFromStorage(GO_ORB_OF_DOMINATION))
                    Orb->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NO_INTERACT);

				if (Creature* pTrigger = GetSingleCreatureFromStorage(NPC_NEFARIANS_TROOPS))
				{
					DoScriptText(EMOTE_ORB_SHUT_OFF, pTrigger);
					DoScriptText(EMOTE_TROOPS_FLEE, pTrigger);
				}

				for (GuidList::const_iterator itr = m_lDefendersGuids.begin(); itr != m_lDefendersGuids.end(); ++itr)
				{
					if (Creature* pDefender = instance->GetCreature(*itr))
					{
						pDefender->SetFlag(UNIT_NPC_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_PASSIVE);
						pDefender->setFaction(35);
						pDefender->DeleteThreatList();
						pDefender->CombatStop();
						pDefender->SetCanAttackPlayer(false);
						pDefender->AI()->EnterEvadeMode();
						pDefender->ForcedDespawn(15000);
					}
				}

                if (Creature* pRazorgore = GetSingleCreatureFromStorage(NPC_RAZORGORE))
                {
                    pRazorgore->SetHealthPercent(100.0f);

                    if (Unit* pController = pRazorgore->GetCharmerOrOwner())
                    {
						pController->CastStop();
						pController->RemoveAurasDueToSpell(SPELL_MIND_EXHAUSTION);
                        pController->RemoveAurasDueToSpell(SPELL_USE_DRAGON_ORB);
                        pRazorgore->RemoveAurasDueToSpell(SPELL_USE_DRAGON_ORB);
                        pRazorgore->AI()->AttackStart(pController);
                        pRazorgore->TauntApply(pController);
						pRazorgore->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.20f);
                    }
                }

				m_lDefendersGuids.clear();
		}
            else
                debug_log("BWL: Black Dragon Eggs left to destroy: %u", m_lDragonEggsGuids.size());
    }
}
开发者ID:yyhhrr,项目名称:mangospriv,代码行数:57,代码来源:instance_blackwing_lair.cpp


示例9: GetSingleGameObjectFromStorage

void instance_ulduar::CloseDoor(uint32 uiEntry)
{
    if(!uiEntry)
        return;

    GameObject* pGo = GetSingleGameObjectFromStorage(uiEntry);

    if(pGo)
        pGo->SetGoState(GO_STATE_READY);
}
开发者ID:Reamer,项目名称:cyber-scriptdev2,代码行数:10,代码来源:instance_ulduar.cpp


示例10: GetSingleCreatureFromStorage

void instance_sethekk_halls::FinishAnzuIntro()
{
    Creature* target = GetSingleCreatureFromStorage(NPC_INVIS_RAVEN_GOD_TARGET, true);
    target->SummonCreature(NPC_ANZU, -89.20406f, 287.9736f, 26.5665f, 3.001966f, TEMPSPAWN_MANUAL_DESPAWN, 0);
    static_cast<TemporarySpawn*>(target)->UnSummon();
    GuidVector casterVector;
    GetCreatureGuidVectorFromStorage(NPC_INVIS_RAVEN_GOD_CASTER, casterVector);
    for (ObjectGuid guid : casterVector)
        if (Creature* caster = instance->GetCreature(guid))
            static_cast<TemporarySpawn*>(caster)->UnSummon();
    Creature* portal = GetSingleCreatureFromStorage(NPC_INVIS_RAVEN_GOD_PORTAL, true);
    static_cast<TemporarySpawn*>(portal)->UnSummon();
    GameObject* ravensClaw = GetSingleGameObjectFromStorage(GO_RAVENS_CLAW);
    ravensClaw->SetRespawnTime(7 * DAY);
    ravensClaw->SetLootState(GO_JUST_DEACTIVATED);
    GameObject* moonstone = GetSingleGameObjectFromStorage(GO_MOONSTONE);
    moonstone->SetLootState(GO_JUST_DEACTIVATED);
    GameObject* testRift = GetSingleGameObjectFromStorage(GO_TEST_RIFT);
    testRift->SetLootState(GO_JUST_DEACTIVATED);
}
开发者ID:wowx,项目名称:mangos-tbc,代码行数:20,代码来源:sethekk_halls.cpp


示例11: switch

void instance_maraudon::SetData(uint32 type, uint32 data)
{
    if (type == TYPE_NOXXION)
    {
        // Do nothing if we are receiving the same data
        if (m_encounter[TYPE_NOXXION] == data)
            return;

        m_encounter[type] = data;
        switch (data)
        {
            // If Noxxion encounter is done or spewer attacked, stop spewing larvas
            case DONE:
                // Destroy the corruption spewer near Noxxion
                if (GameObject* go = GetSingleGameObjectFromStorage(GO_CORRUPTION_SPEWER))
                    go->SetLootState(GO_ACTIVATED);
                // no break, the special part is also executed
            case SPECIAL:
                m_spewLarvaTimer = 0;
                // Destroy the larva spewer if not already done
                if (GameObject* go = GetSingleGameObjectFromStorage(GO_LARVA_SPEWER))
                {
                    if (go->getLootState() != GO_ACTIVATED)
                        go->SetLootState(GO_ACTIVATED);
                }
        }
    }

    if (data == DONE)
    {
        OUT_SAVE_INST_DATA;

        std::ostringstream saveStream;

        saveStream << m_encounter[0];

        m_strInstData = saveStream.str();
        SaveToDB();
        OUT_SAVE_INST_DATA_COMPLETE;
    }
}
开发者ID:killerwife,项目名称:mangos-tbc,代码行数:41,代码来源:instance_maraudon.cpp


示例12: DialogueUpdate

void instance_icecrown_citadel::Update(uint32 uiDiff)
{
    DialogueUpdate(uiDiff);

    if (m_uiPutricideValveTimer)
    {
        if (m_uiPutricideValveTimer <= uiDiff)
        {
            // Open the pathway to Putricide when the timer expires
            DoUseDoorOrButton(GO_SCIENTIST_DOOR_COLLISION);
            if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_SCIENTIST_DOOR_GREEN))
                pDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
            if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_SCIENTIST_DOOR_ORANGE))
                pDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);

            m_uiPutricideValveTimer = 0;
        }
        else
            m_uiPutricideValveTimer -= uiDiff;
    }
}
开发者ID:ErYayo,项目名称:scripts,代码行数:21,代码来源:instance_icecrown_citadel.cpp


示例13: switch

void instance_the_eye::SetData(uint32 uiType, uint32 uiData)
{
    switch (uiType)
    {
        case TYPE_ALAR:
        case TYPE_SOLARIAN:
        case TYPE_VOIDREAVER:
            m_auiEncounter[uiType] = uiData;
            break;
        case TYPE_KAELTHAS:
            // Don't set the same data twice
            if (m_auiEncounter[uiType] == uiData)
                break;
            DoUseDoorOrButton(GO_ARCANE_DOOR_HORIZ_3);
            DoUseDoorOrButton(GO_ARCANE_DOOR_HORIZ_4);
            if (uiData == FAIL)
            {
                if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_KAEL_STATUE_LEFT))
                    pGo->ResetDoorOrButton();
                if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_KAEL_STATUE_RIGHT))
                    pGo->ResetDoorOrButton();
                if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_BRIDGE_WINDOW))
                    pGo->ResetDoorOrButton();

                // Respawn or reset the advisors
                for (uint8 i = 0; i < MAX_ADVISORS; ++i)
                {
                    if (Creature* pTemp = GetSingleCreatureFromStorage(aAdvisors[i]))
                    {
                        if (!pTemp->isAlive())
                            pTemp->Respawn();
                        else
                            pTemp->AI()->EnterEvadeMode();
                    }
                }
            }
            m_auiEncounter[uiType] = uiData;
            break;
    }
}
开发者ID:SakhWoW,项目名称:blizzlikecore,代码行数:40,代码来源:instance_the_eye.cpp


示例14: switch

void instance_deadmines::Update(uint32 uiDiff)
{
    if (m_uiIronDoorTimer)
    {
        if (m_uiIronDoorTimer <= uiDiff)
        {
            if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE))
            {
                switch(m_uiDoorStep)
                {
                    case 0:
                        DoScriptText(INST_SAY_ALARM1,pMrSmite);
                        m_uiIronDoorTimer = 2000;
                        ++m_uiDoorStep;
                        break;
                    case 1:
                    {
                        if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR))
                        {
                            // should be static spawns, fetch the closest ones at the pier
                            if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f))
                            {
                                pi1->RemoveSplineFlag(SPLINEFLAG_WALKMODE);
                                pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ());
                            }

                            if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f))
                            {
                                pi2->RemoveSplineFlag(SPLINEFLAG_WALKMODE);
                                pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ());
                            }
                        }

                        ++m_uiDoorStep;
                        m_uiIronDoorTimer = 10000;
                        break;
                    }
                    case 2:
                        DoScriptText(INST_SAY_ALARM2,pMrSmite);
                        m_uiDoorStep = 0;
                        m_uiIronDoorTimer = 0;
                        debug_log("SD2: Instance Deadmines: Iron door event reached end.");
                        break;
                }
            }
            else
                m_uiIronDoorTimer = 0;
        }
        else
            m_uiIronDoorTimer -= uiDiff;
    }
}
开发者ID:ryzu,项目名称:scriptdev0,代码行数:52,代码来源:instance_deadmines.cpp


示例15: switch

void instance_deadmines::Update(uint32 uiDiff)
{
    if (m_uiIronDoorTimer)
    {
        if (m_uiIronDoorTimer <= uiDiff)
        {
            switch (m_uiDoorStep)
            {
            case 0:
                DoUseDoorOrButton(GO_IRON_CLAD_DOOR, 0, true);

                if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE))
                {
                    DoScriptText(INST_SAY_ALARM1, pMrSmite);
                }

                if (GameObject* pDoor = GetSingleGameObjectFromStorage(GO_IRON_CLAD_DOOR))
                {
                    // should be static spawns, fetch the closest ones at the pier
                    if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f))
                    {
                        pi1->SetWalk(false);
                        pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ());
                    }

                    if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f))
                    {
                        pi2->SetWalk(false);
                        pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ());
                    }
                }

                ++m_uiDoorStep;
                m_uiIronDoorTimer = 15000;
                break;
            case 1:
                if (Creature* pMrSmite = GetSingleCreatureFromStorage(NPC_MR_SMITE))
                {
                    DoScriptText(INST_SAY_ALARM2, pMrSmite);
                }

                m_uiDoorStep = 0;
                m_uiIronDoorTimer = 0;
                break;
            }
        }
        else
        {
            m_uiIronDoorTimer -= uiDiff;
        }
    }
}
开发者ID:haidusg,项目名称:scripts,代码行数:52,代码来源:instance_deadmines.cpp


示例16: GetSingleGameObjectFromStorage

void instance_sethekk_halls::StartAnzuIntro(Player* player)
{
    Creature* target = player->SummonCreature(NPC_INVIS_RAVEN_GOD_TARGET, -87.08602f, 287.8433f, 28.386f, 3.455752f, TEMPSPAWN_MANUAL_DESPAWN, 0, true);
    target->CastSpell(nullptr, SPELL_PURPLE_BANISH_STATE, TRIGGERED_NONE);
    Creature* portal = player->SummonCreature(NPC_INVIS_RAVEN_GOD_PORTAL, -87.28478f, 287.6349f, 27.17761f, 0.5759587f, TEMPSPAWN_MANUAL_DESPAWN, 0, true);
    portal->CastSpell(nullptr, SPELL_OTHERWORLDLY_PORTAL, TRIGGERED_NONE);
    for (uint32 i = 0; i < TRIGGER_COUNT; ++i)
    {
        Creature* caster = player->SummonCreature(NPC_INVIS_RAVEN_GOD_CASTER, triggerPositions[i][0], triggerPositions[i][1], triggerPositions[i][2], triggerPositions[i][3], TEMPSPAWN_MANUAL_DESPAWN, 0, true);
        caster->CastSpell(nullptr, SPELL_RAVEN_GOD_SUMMON_BEAMS, TRIGGERED_NONE);
    }
    GameObject* moonstone = GetSingleGameObjectFromStorage(GO_MOONSTONE);
    moonstone->SetLootState(GO_READY);
    moonstone->SetRespawnTime(2 * MINUTE * IN_MILLISECONDS);
    moonstone->Refresh();
    GameObject* testRift = GetSingleGameObjectFromStorage(GO_TEST_RIFT);
    testRift->SetLootState(GO_READY);
    testRift->SetRespawnTime(2 * MINUTE * IN_MILLISECONDS);
    testRift->Refresh();
    m_anzuTimer = 6000;
    m_anzuStage = 0;
}
开发者ID:wowx,项目名称:mangos-tbc,代码行数:22,代码来源:sethekk_halls.cpp


示例17: switch

void instance_halls_of_lightning::SetData(uint32 uiType, uint32 uiData)
{
    switch (uiType)
    {
        case TYPE_BJARNGRIM:
            if (uiData == SPECIAL)
                m_bLightningStruck = true;
            else if (uiData == FAIL)
                m_bLightningStruck = false;
            m_auiEncounter[uiType] = uiData;
            break;
        case TYPE_VOLKHAN:
            if (uiData == DONE)
                DoUseDoorOrButton(GO_VOLKHAN_DOOR);
            else if (uiData == IN_PROGRESS)
                m_bIsShatterResistant = true;
            else if (uiData == SPECIAL)
                m_bIsShatterResistant = false;
            m_auiEncounter[uiType] = uiData;
            break;
        case TYPE_IONAR:
            if (uiData == DONE)
                DoUseDoorOrButton(GO_IONAR_DOOR);
            m_auiEncounter[uiType] = uiData;
            break;
        case TYPE_LOKEN:
            if (uiData == IN_PROGRESS)
                DoStartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEV_START_LOKEN_ID);
            else if (uiData == DONE)
            {
                // Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder
                if (GameObject* pGlobe = GetSingleGameObjectFromStorage(GO_LOKEN_THRONE))
                    pGlobe->SetGoState(GO_STATE_ACTIVE);
            }
            m_auiEncounter[uiType] = uiData;
            break;
    }

    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:DasBlub,项目名称:scriptdev2,代码行数:51,代码来源:instance_halls_of_lightning.cpp


示例18: switch

void instance_baradin_hold::SetData(uint32 uiType, uint32 uiData)
{
    switch (uiType)
    {
        case TYPE_ARGALOTH:
            m_auiEncounter[uiType] = uiData;
            if (GameObject* go = GetSingleGameObjectFromStorage(GO_DOOR_ARGALOTH))
                go->SetGoState(uiData == IN_PROGRESS ? GO_STATE_READY : GO_STATE_ACTIVE);
            break;
        case TYPE_OCCUTHAR:
            m_auiEncounter[uiType] = uiData;
            if (GameObject* go = GetSingleGameObjectFromStorage(GO_DOOR_OCCUTHAR))
                go->SetGoState(uiData == IN_PROGRESS ? GO_STATE_READY : GO_STATE_ACTIVE);
            break;
        case TYPE_ALIZABAL:
            m_auiEncounter[uiType] = uiData;
            if (GameObject* go = GetSingleGameObjectFromStorage(GO_DOOR_ALIZABAL))
                go->SetGoState(uiData == IN_PROGRESS ? GO_STATE_READY : GO_STATE_ACTIVE);
            break;
        default:
            return;
    }

    if (uiData == DONE)
    {
        OUT_SAVE_INST_DATA;

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

        m_strInstData = saveStream.str();

        SaveToDB();
        OUT_SAVE_INST_DATA_COMPLETE;
    }
}
开发者ID:Calixa,项目名称:murlocs_434,代码行数:36,代码来源:instance_baradin_hold.cpp


示例19: switch

void instance_blackwing_lair::OnObjectUse(GameObject* pGo)
{
    switch(pGo->GetEntry())
    {
        case GO_CHROMAGGUS_LEVER:
            if (GameObject* pGo = GetSingleGameObjectFromStorage(GO_PORTCULLIS_CHROMAGGUS))
            {
                pGo->SetGoState(GO_STATE_ACTIVE);
                m_uiChromaggusPullTimer = 2000;
            }
            break;
        default:
            break;
    }
}
开发者ID:yyhhrr,项目名称:mangospriv,代码行数:15,代码来源:instance_blackwing_lair.cpp


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetSister函数代码示例发布时间:2022-05-30
下一篇:
C++ GetSingleCreatureGuid函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap