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


C++ Summon函数代码示例

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


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

示例1: UpdateAI

        void UpdateAI(const uint32 diff)
        {
            if (!UpdateVictim())
                return;

            if (uiSummonTimer <= diff)
            {
                Summon();
                uiSummonTimer = 15*IN_MILLISECONDS;
            } else uiSummonTimer -= diff;

            if (uiMindFlayTimer <= diff)
            {
                    DoCast(me->getVictim(), SPELL_MIND_FLAY);
                    uiMindFlayTimer = 15*IN_MILLISECONDS;
                } else uiMindFlayTimer -= diff;

            if (uiCurseFatigueTimer <= diff)
            {
                //WowWiki say "Curse of Fatigue-Kirk'thir will cast Curse of Fatigue on 2-3 targets periodically."
                if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
                    DoCast(target, SPELL_CURSE_OF_FATIGUE);
                if (Unit* tankTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
                    DoCast(tankTarget, SPELL_CURSE_OF_FATIGUE);

                uiCurseFatigueTimer = 10*IN_MILLISECONDS;
            } else uiCurseFatigueTimer -= diff;

            if (!me->HasAura(SPELL_FRENZY) && HealthBelowPct(10))
                DoCast(me, SPELL_FRENZY, true);

            DoMeleeAttackIfReady();
        }
开发者ID:Frimost,项目名称:IceLands,代码行数:33,代码来源:boss_krikthir_the_gatewatcher.cpp

示例2: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
            return;

        if (SummonTimer <= diff)
        {
            Summon();
            SummonTimer = 15000;
        } else SummonTimer -= diff;

        if (MindFlayTimer <= diff)
        {
                DoCast(m_creature->getVictim(), HEROIC(SPELL_MIND_FLAY, H_SPELL_MIND_FLAY));
                MindFlayTimer = 15000;
            } else MindFlayTimer -= diff;

        if (CurseFatigueTimer <= diff)
        {
            //WowWiki say "Curse of Fatigue-Kirk'thir will cast Curse of Fatigue on 2-3 targets periodically. "
            Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
            Unit *pTarget_1 = SelectUnit(SELECT_TARGET_RANDOM, 1);

            DoCast(pTarget, HEROIC(SPELL_CURSE_OF_FATIGUE, H_SPELL_CURSE_OF_FATIGUE));
            DoCast(pTarget_1, HEROIC(SPELL_CURSE_OF_FATIGUE, H_SPELL_CURSE_OF_FATIGUE));

            CurseFatigueTimer = 10000;
        } else CurseFatigueTimer -= diff;

        if (!m_creature->HasAura(SPELL_FRENZY) && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 10)
            m_creature->CastSpell(m_creature,SPELL_FRENZY,true);

        DoMeleeAttackIfReady();
    }
开发者ID:Sanzzes,项目名称:wopc-core,代码行数:34,代码来源:boss_krikthir_the_gatewatcher.cpp

示例3: EnterCombat

        void EnterCombat(Unit* /*who*/)
        {
            DoScriptText(SAY_AGGRO, me);
            Summon();
            uiSummonTimer = 15*IN_MILLISECONDS;

            if (pInstance)
                pInstance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, IN_PROGRESS);
        }
开发者ID:Frimost,项目名称:IceLands,代码行数:9,代码来源:boss_krikthir_the_gatewatcher.cpp

示例4: EnterCombat

        void EnterCombat(Unit* /*who*/)
        {
            Talk(SAY_AGGRO);
            Summon();
            uiSummonTimer = 15*IN_MILLISECONDS;

            if (instance)
                instance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, IN_PROGRESS);
        }
开发者ID:Adeer,项目名称:Patchs,代码行数:9,代码来源:boss_krikthir_the_gatewatcher.cpp

示例5: UpdateAI

 void UpdateAI(uint32 const diff)
 {
     if (SummonTimer <= diff)
     {
         uint8 summon = urand(0,1);
         Summon(summon);
         SummonTimer = 15000;
     } else SummonTimer -= diff;
 }
开发者ID:jsj2008,项目名称:StarGate-Plus-EMU,代码行数:9,代码来源:boss_setesh.cpp

示例6: EnterCombat

    void EnterCombat(Unit* who)
    {
        DoScriptText(SAY_AGGRO, m_creature);
        Summon();
        SummonTimer = 15000;

        if (pInstance)
            pInstance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, IN_PROGRESS);
    }
开发者ID:Sanzzes,项目名称:wopc-core,代码行数:9,代码来源:boss_krikthir_the_gatewatcher.cpp

示例7: EnterCombat

            void EnterCombat(Unit* /*who*/) override
            {
                Talk(SAY_AGGRO);
                _EnterCombat();
                Summon();

                events.ScheduleEvent(EVENT_SUMMON, 15000);
                events.ScheduleEvent(EVENT_MIND_FLAY, 15000);
                events.ScheduleEvent(EVENT_CURSE_FATIGUE, 12000);
            }
开发者ID:Abrek,项目名称:My-WoDCore-6.x.x,代码行数:10,代码来源:boss_krikthir_the_gatewatcher.cpp

示例8: AIUpdate

    void AIUpdate()
    {
		if((GetHealthPercent() <= 76 && summon == 0) 
		|| (GetHealthPercent() <= 51 && summon == 2) 
		|| (GetHealthPercent() <= 25 && summon == 4))
			summon += 1;
		
		if(summon == 1 || summon == 3 || summon == 5) 
			Summon();

		if( mRift == true && ( pChaoticRift == NULL || !pChaoticRift->isAlive() ))
		{
			RemoveAura(47748);
			mRift = false;
		};

		ParentClass::AIUpdate();
    };
开发者ID:Vanj-crew,项目名称:HearthStone-Emu,代码行数:18,代码来源:Instance_Nexus.cpp

示例9: UpdateAI

    void UpdateAI(const uint32 uiDiff) override
    {
        if(!m_pInstance) return;

        if (m_pInstance->GetData(TYPE_EVENT) == 6)
        {
            m_pInstance->SetData(TYPE_EVENT, 7);
            Summon();
        }

        if(m_pInstance->GetData(TYPE_MARWYN) == SPECIAL)
        {
            if(m_uiSummonTimer < uiDiff)
            {
                ++SummonCount;
                m_pInstance->SetData(DATA_WAVE_COUNT,SummonCount+5);
                if(SummonCount == 1)
                    DoScriptText(SAY_MARWYN_INTRO, m_creature);

                if(SummonCount > 4)
                {
                    m_pInstance->SetData(TYPE_MARWYN, IN_PROGRESS);
                    m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                    m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                    m_creature->SetInCombatWithZone();
                }
                else CallFallSoldier();
                m_uiSummonTimer = 60000;
            } else m_uiSummonTimer -= uiDiff;
        }

        if(!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        timedCast(SPELL_OBLITERATE, uiDiff);
        timedCast(SPELL_WELL_OF_CORRUPTION, uiDiff);
        timedCast(SPELL_SHARED_SUFFERING, uiDiff);
        timedCast(SPELL_CORRUPTED_FLESH, uiDiff);

        timedCast(SPELL_BERSERK, uiDiff);

        DoMeleeAttackIfReady();
    }
开发者ID:sergeev,项目名称:scriptdev2,代码行数:43,代码来源:boss_marwyn.cpp

示例10: WaypointReached

    void WaypointReached(uint32 uiPoint)
    {
        //just in case
        if (GetPlayerForEscort())
            if (me->GetFaction() != GetPlayerForEscort()->GetFaction())
                me->SetFaction(GetPlayerForEscort()->GetFaction());

        switch (uiPoint)
        {
        case 3:
            SetEscortPaused(true);
            NextStep(2000, false, 3);
            break;
        case 7:
            SetEscortPaused(true);
            NextStep(2000, false, 4);
            break;
        case 9:
            NextStep(1000, false, 8);
            break;
        case 10:
            NextStep(25000, false, 10);
            break;
        case 11:
            SetEscortPaused(true);
            SetInFace(true);
            NextStep(1000, false, 11);
            break;
        case 12:
            NextStep(25000, false, 18);
            break;
        case 13:
            Summon(7);
            NextStep(25000, false, 19);
            break;
        case 14:
            SetInFace(false);
            DoScriptText(SAY_BLASTMASTER_26, me);
            SetEscortPaused(true);
            NextStep(5000, false, 20);
            break;
        }
    }
开发者ID:Phentora,项目名称:OregonCore,代码行数:43,代码来源:gnomeregan.cpp

示例11: WaypointReached

        void WaypointReached(uint32 waypointId) override
        {
            //just in case
            if (GetPlayerForEscort())
                if (me->getFaction() != GetPlayerForEscort()->getFaction())
                    me->setFaction(GetPlayerForEscort()->getFaction());

            switch (waypointId)
            {
                case 3:
                    SetEscortPaused(true);
                    NextStep(2000, false, 3);
                    break;
                case 7:
                    SetEscortPaused(true);
                    NextStep(2000, false, 4);
                    break;
                case 9:
                    NextStep(1000, false, 8);
                    break;
                case 10:
                    NextStep(25000, false, 10);
                    break;
                case 11:
                    SetEscortPaused(true);
                    SetInFace(true);
                    NextStep(1000, false, 11);
                    break;
                case 12:
                    NextStep(25000, false, 18);
                    break;
                case 13:
                    Summon(6);
                    NextStep(25000, false, 19);
                    break;
                case 14:
                    SetInFace(false);
                    Talk(SAY_BLASTMASTER_17);
                    SetEscortPaused(true);
                    NextStep(5000, false, 20);
                    break;
            }
        }
开发者ID:martial69320,项目名称:cerberus,代码行数:43,代码来源:gnomeregan.cpp

示例12: SummonWaveP1

            void SummonWaveP1()
            {
                uint8 addIndex = _waveCounter & 1;
                uint8 addIndexOther = uint8(addIndex ^ 1);

                if (_waveCounter || !sPoolMgr->IsSpawnedObject<Quest>(QUEST_DEPROGRAMMING))
                    Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3]);
                else
                    Summon(NPC_DARNAVAN, SummonPositions[addIndex * 3]);

                Summon(SummonEntries[addIndexOther], SummonPositions[addIndex * 3 + 1]);
                Summon(SummonEntries[addIndex], SummonPositions[addIndex * 3 + 2]);
                if (Is25ManRaid())
                {
                    Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3]);
                    Summon(SummonEntries[addIndex], SummonPositions[addIndexOther * 3 + 1]);
                    Summon(SummonEntries[addIndexOther], SummonPositions[addIndexOther * 3 + 2]);
                    Summon(SummonEntries[urand(0, 1)], SummonPositions[6]);
                }

                ++_waveCounter;
            }
开发者ID:Anonymus123,项目名称:AtomicCore-3.3.5a,代码行数:22,代码来源:boss_lady_deathwhisper.cpp

示例13: UpdateAI

    void UpdateAI(const uint32 uiDiff) override
    {
        if (!m_pInstance)
            return;

        if (m_pInstance->GetData(TYPE_EVENT) == 5)
        {
            m_pInstance->SetData(TYPE_EVENT, 6);
            Summon();
        }

        if (m_pInstance->GetData(TYPE_FALRIC) == SPECIAL)
        {

            if (m_uiSummonTimer < uiDiff)
            {
                    ++SummonCount;
                    m_pInstance->SetData(DATA_WAVE_COUNT,SummonCount);
                    if(SummonCount > 4)
                    {
                        m_pInstance->SetData(TYPE_FALRIC, IN_PROGRESS);
                        m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                        m_creature->SetInCombatWithZone();
                    }
                    else CallFallSoldier();
                    m_uiSummonTimer = 60000;
            } else m_uiSummonTimer -= uiDiff;
        }

        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        timedCast(SPELL_QUIVERING_STRIKE, uiDiff);
        timedCast(SPELL_IMPENDING_DESPAIR, uiDiff);
        timedCast(SPELL_DEFILING_HORROR, uiDiff);

        timedCast(SPELL_BERSERK, uiDiff);

        DoMeleeAttackIfReady();

    }
开发者ID:mynew4,项目名称:RustEmu-Core,代码行数:41,代码来源:boss_falric.cpp

示例14: Cmd_Summon_f

void Cmd_Summon_f(edict_t *ent)
{
	char * name = gi.args();
	edict_t * target;
	int i;

	for (i = 1; i < (int)(maxclients->value)+1; i++)
	{
		target = &g_edicts[i];

		if (!target->inuse || !target->client || IsSpectator(target))
			continue;
		if (target == ent)
			continue;
		// if a specific name requested & doesn't match, skip
		if (name[0] && Q_stricmp(name, target->client->pers.netname))
			continue;

		Summon(ent, target);
		return;
	}
}
开发者ID:ZwS,项目名称:qudos,代码行数:22,代码来源:b_coopcam.c

示例15: UpdateAI

            void UpdateAI(uint32 diff) override
            {
                if (!UpdateVictim())
                    return;

                events.Update(diff);

                if (me->HasUnitState(UNIT_STATE_CASTING))
                    return;

                while (uint32 eventId = events.ExecuteEvent())
                {
                    switch (eventId)
                    {
                        case EVENT_SUMMON:
                            Summon();
                            events.ScheduleEvent(EVENT_SUMMON, 15000);
                            break;
                        case EVENT_MIND_FLAY:
                            DoCastVictim(SPELL_MIND_FLAY);
                            events.ScheduleEvent(EVENT_MIND_FLAY, 15000);
                            break;
                        case EVENT_CURSE_FATIGUE:
                            if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
                                DoCast(target, SPELL_CURSE_OF_FATIGUE);
                            events.ScheduleEvent(EVENT_CURSE_FATIGUE, 10000);
                            break;
                        default:
                            break;
                    }
                }

                if (!me->HasAura(SPELL_FRENZY) && HealthBelowPct(10))
                    DoCast(me, SPELL_FRENZY, true);

                DoMeleeAttackIfReady();
            }
开发者ID:Abrek,项目名称:My-WoDCore-6.x.x,代码行数:37,代码来源:boss_krikthir_the_gatewatcher.cpp


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