Example #1
0
        // Wrapper to activate dragon orbs
        void DoActivateDragonOrb(uint32 uiEntry)
        {
            if (!m_pInstance)
            {
                return;
            }

            // Set the visual around the Orb
            if (GameObject* pGo = m_pInstance->GetSingleGameObjectFromStorage(uiEntry))
            {
                if (Creature* pTarget = GetClosestCreatureWithEntry(pGo, NPC_BLUE_ORB_TARGET, 5.0f))
                {
                    pTarget->CastSpell(pTarget, SPELL_RING_BLUE_FLAME, false);
                }
            }

            // Make the orb usable
            m_pInstance->DoToggleGameObjectFlags(uiEntry, GO_FLAG_NO_INTERACT, false);
        }