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


C++ DoYell函数代码示例

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


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

示例1: AttackStart

    void AttackStart(Unit *who)
    {
        if (!who)
            return;

        if (who->isTargetableForAttack() && who!= m_creature)
        {
            DoStartMeleeAttack(who);
            InCombat = true;
            
            //Switch between 3 different aggro saying
            switch (rand()%3)
                {
                case 0:
                    DoYell(SAY_AGGRO1,LANG_UNIVERSAL,NULL);
                    break;

                case 1:
                    DoYell(SAY_AGGRO2,LANG_UNIVERSAL,NULL);
                    break;

                case 2:
                    DoYell(SAY_AGGRO3,LANG_UNIVERSAL,NULL);
                    break;
                }
        }
    }
开发者ID:Aion,项目名称:caldari,代码行数:27,代码来源:sc_scarlet_torturer.cpp

示例2: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        // we're still doing awaken animation
        if (wakingUp && Awaken_Timer >= 0) {
            Awaken_Timer -= diff;
            return;        // dont do anything until we are done
        } else if (wakingUp && Awaken_Timer <= 0) {
            wakingUp = false;
            AttackStart(Unit::GetUnit(*m_creature, pInstance->GetData64(0)));
            return;     // dont want to continue until we finish the AttackStart method
        }

        //Return since we have no target
        if (!UpdateVictim())
            return;


        // wake a wall minion
        if (WallMinionTimer < diff) {
            pInstance->SetData (NULL, 2);

            WallMinionTimer = 10000;
        } else WallMinionTimer -= diff;

        //If we are <66 summon the guardians
        if ( !guardiansAwake && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 66) {
            ActivateMinion(pInstance->GetData64(5),true);   // EarthenGuardian1
            ActivateMinion(pInstance->GetData64(6),true);   // EarthenGuardian2
            ActivateMinion(pInstance->GetData64(7),true);   // EarthenGuardian3
            ActivateMinion(pInstance->GetData64(8),true);   // EarthenGuardian4
            ActivateMinion(pInstance->GetData64(9),true);   // EarthenGuardian5
            ActivateMinion(pInstance->GetData64(10),false); // EarthenGuardian6
            DoYell(SAY_SUMMON,LANG_UNIVERSAL, NULL);
            DoPlaySoundToSet(m_creature, SOUND_SUMMON);
            guardiansAwake = true;
        }

        //If we are <33 summon the vault walkers
        if ( !vaultWalkersAwake && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 33) {
            ActivateMinion(pInstance->GetData64(1),true);    // VaultWalker1
            ActivateMinion(pInstance->GetData64(2),true);    // VaultWalker2
            ActivateMinion(pInstance->GetData64(3),true);    // VaultWalker3
            ActivateMinion(pInstance->GetData64(4),false);    // VaultWalker4
            DoYell(SAY_SUMMON2, LANG_UNIVERSAL, NULL);
            DoPlaySoundToSet(m_creature, SOUND_SUMMON2);
            vaultWalkersAwake = true;
        }


        if (Tremor_Timer < diff)
        {
            //Cast
            DoCast(m_creature->getVictim(),SPELL_GROUND_TREMOR);

            //45 seconds until we should cast this agian
            Tremor_Timer  = 45000;
        }else Tremor_Timer  -= diff;

        DoMeleeAttackIfReady();
    }
开发者ID:mynew,项目名称:TrinityCore-1,代码行数:60,代码来源:boss_archaedas.cpp

示例3: EnterPhase

 void EnterPhase(PhaseHalazzi NextPhase)
 {
     switch(NextPhase)
     {
     case PHASE_LYNX:
     case PHASE_ENRAGE:
         if(Phase == PHASE_MERGE)
         {
             m_creature->CastSpell(m_creature, SPELL_TRANSFORM_MERGE, true);
             m_creature->Attack(m_creature->getVictim(), true);
             m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
         }
         if(Unit *Lynx = Unit::GetUnit(*m_creature, LynxGUID))
         {
             Lynx->SetVisibility(VISIBILITY_OFF);
             Lynx->setDeathState(JUST_DIED);
         }
         m_creature->SetMaxHealth(600000);
         m_creature->SetHealth(600000 - 150000 * TransformCount);
         FrenzyTimer = 16000;
         SaberlashTimer = 20000;
         ShockTimer = 10000;
         TotemTimer = 12000;
         break;
     case PHASE_SPLIT:
         DoYell(YELL_SPLIT, LANG_UNIVERSAL, NULL);
         DoPlaySoundToSet(m_creature, SOUND_SPLIT);
         m_creature->CastSpell(m_creature, SPELL_TRANSFORM_SPLIT, true);
         break;
     case PHASE_HUMAN:
         //DoCast(m_creature, SPELL_SUMMON_LYNX, true);
         DoSpawnCreature(MOB_SPIRIT_LYNX, 5,5,0,0, TEMPSUMMON_CORPSE_DESPAWN, 0);
         m_creature->SetMaxHealth(400000);
         m_creature->SetHealth(400000);
         ShockTimer = 10000;
         TotemTimer = 12000;
         break;
     case PHASE_MERGE:
         if(Unit *Lynx = Unit::GetUnit(*m_creature, LynxGUID))
         {
             DoYell(YELL_MERGE, LANG_UNIVERSAL, NULL);
             DoPlaySoundToSet(m_creature, SOUND_MERGE);
             Lynx->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
             Lynx->GetMotionMaster()->Clear();
             Lynx->GetMotionMaster()->MoveFollow(m_creature, 0, 0);
             m_creature->GetMotionMaster()->Clear();
             m_creature->GetMotionMaster()->MoveFollow(Lynx, 0, 0);
             TransformCount++;
         }break;
     default:
         break;
     }
     Phase = NextPhase;
 }
开发者ID:MilchBuby,项目名称:riboncore,代码行数:54,代码来源:boss_halazzi.cpp

示例4: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        //Return since we have no target
        if(!m_creature->SelectHostilTarget() || !m_creature->getVictim() )
            return;

        if(FrostArmorTimer < diff)
        {
            DoCast(m_creature, SPELL_FROST_ARMOR);
            FrostArmorTimer = 40000+rand()%20000;
        }else FrostArmorTimer -= diff;
        if(DecayTimer < diff)
        {
            DoCast(m_creature->getVictim(), SPELL_DEATH_AND_DECAY);
            DecayTimer = 60000+rand()%20000;
            switch(rand()%2)
            {
                case 0:
                    DoPlaySoundToSet(m_creature, SOUND_DECAY1);
                    DoYell(SAY_DECAY1, LANG_UNIVERSAL, NULL);
                    break;
                case 1:
                    DoPlaySoundToSet(m_creature, SOUND_DECAY2);
                    DoYell(SAY_DECAY2, LANG_UNIVERSAL, NULL);
                    break;        
            }    
        }else DecayTimer -= diff;
        if(NovaTimer < diff)
        {
            DoCast(m_creature->getVictim(), SPELL_FROST_NOVA);
            NovaTimer = 30000+rand()%15000;
            switch(rand()%2)
            {
                case 0:
                    DoPlaySoundToSet(m_creature, SOUND_NOVA1);
                    DoYell(SAY_NOVA1, LANG_UNIVERSAL, NULL);
                    break;
                case 1:
                    DoPlaySoundToSet(m_creature, SOUND_NOVA2);
                    DoYell(SAY_NOVA2, LANG_UNIVERSAL, NULL);
                    break;        
            }
        }else NovaTimer -= diff;
        if(IceboltTimer < diff)
        {
            DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_ICEBOLT);
            IceboltTimer = 11000+rand()%20000;
        }else IceboltTimer -= diff;

        DoMeleeAttackIfReady();
    }
开发者ID:wk23,项目名称:tst,代码行数:51,代码来源:boss_rage_winterchill.cpp

示例5: DoYell

void flesh_tentacleAI::JustDied(Unit* killer)
{
    if (!Parent)
    {
        DoYell("Error: No Parent variable", LANG_UNIVERSAL, NULL);
        return;
    }

    Creature* Cthun = Unit::GetCreature(*m_creature, Parent);

    if (Cthun)
        ((cthunAI*)(Cthun->AI()))->FleshTentcleKilled();
    else DoYell("Error: No Cthun", LANG_UNIVERSAL, NULL);
}
开发者ID:Blumfield,项目名称:ptc2,代码行数:14,代码来源:boss_cthun.cpp

示例6: KilledUnit

 void KilledUnit()
 {
     switch(rand()%2)
     {
         case 0:
             DoYell(SAY_SLAY1,LANG_UNIVERSAL,NULL);
             DoPlaySoundToSet(me,SOUND_SLAY1);
             break;
         case 1:
             DoYell(SAY_SLAY2,LANG_UNIVERSAL,NULL);
             DoPlaySoundToSet(me,SOUND_SLAY2);
             break;
     }
 }
开发者ID:GameOn,项目名称:gameon,代码行数:14,代码来源:boss_highlord_mograine.cpp

示例7: KilledUnit

 void KilledUnit(Unit* victim)
 {
     switch(rand()%2)
     {
     case 0:
         DoYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
         DoPlaySoundToSet(m_creature, SOUND_ONSLAY1);
         break;
     case 1:
         DoYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
         DoPlaySoundToSet(m_creature, SOUND_ONSLAY2);
         break;
     }
 }
开发者ID:MilchBuby,项目名称:riboncore,代码行数:14,代码来源:boss_akilzon.cpp

示例8: KilledUnit

 void KilledUnit(Unit* victim)
 {
     switch(rand()%2)
     {
     case 0:
         DoYell(YELL_KILL1,LANG_UNIVERSAL, NULL);
         DoPlaySoundToSet(m_creature, SOUND_KILL1);
         break;
     case 1:
         DoYell(YELL_KILL2,LANG_UNIVERSAL, NULL);
         DoPlaySoundToSet(m_creature, SOUND_KILL2);
         break;
     }
 }
开发者ID:wk23,项目名称:tst,代码行数:14,代码来源:boss_felmyst.cpp

示例9: MoveInLineOfSight

    void MoveInLineOfSight(Unit *who)
    {
        if (!who || m_creature->getVictim())
            return;

        if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who))
        {
            float attackRadius = m_creature->GetAttackDistance(who);
            if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE)
            {
                if(who->HasStealthAura())
                    who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);

                if (!HasYelled)
                {
                    DoYell(SAY_LIVING,LANG_UNIVERSAL,NULL);
                    DoPlaySoundToSet(m_creature,SOUND_FLYIN);
                    m_creature->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
                    HasYelled = true;
                }

                //Begin melee attack if we are within range
                DoStartMeleeAttack(who);
                InCombat = true;
            }
        }
    }
开发者ID:ujentus,项目名称:MyTestRepository,代码行数:27,代码来源:sc_mob_eye_of_naxxramas.cpp

示例10: Aggro

    void Aggro(Unit* pWho) 
    { 
        m_creature->SetInCombatWithZone(); 

        DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL); 
        DoPlaySoundToSet(m_creature, 8272); 
    } 
开发者ID:jesst3r,项目名称:scriptdevzero,代码行数:7,代码来源:zero_creatures.cpp

示例11: JustDied

 void JustDied(Unit* Killer)
 {
     DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL);
     DoPlaySoundToSet(m_creature,SOUND_DEATH);
     if( pInstance )
         pInstance->SetData(TYPE_HARBINGERSKYRISS,DONE);
 }
开发者ID:megamage,项目名称:mangos,代码行数:7,代码来源:boss_harbinger_skyriss.cpp

示例12: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (real_event_started)
        {
            if (initial_movement)
            {
                DoYell(SAY_BEGIN, LANG_UNIVERSAL, NULL);
                initial_movement = false;
            }

            Player* player = GetPlayerForEscort();
            if (player)
            {
                if(player->isDead())
                {
                    player->FailQuest(QUEST_PROTECT_DAPHNE);
                    SetVariables();
                }

                if(m_creature->isDead() && player)
                    player->FailQuest(QUEST_PROTECT_DAPHNE);
            }

            UpdateEvent(diff);
        }

        npc_escortAI::UpdateAI(diff);
    }
开发者ID:Dolmero,项目名称:L4G_Core,代码行数:28,代码来源:westfall.cpp

示例13: Aggro

    void Aggro(Unit *who)
    {
        DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL);
        DoPlaySoundToSet(m_creature,SOUND_AGGRO);
		if(pInstance)
			pInstance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
    }
开发者ID:megamage,项目名称:mangos,代码行数:7,代码来源:boss_felblood_kaelthas.cpp

示例14: EnterCombat

 void EnterCombat(Unit *who)
 {
     if(pInstance && IsEvent)
         pInstance->SetData(DATA_KAZROGALEVENT, IN_PROGRESS);
     DoPlaySoundToSet(m_creature, SOUND_ONAGGRO);
     DoYell(SAY_ONAGGRO, LANG_UNIVERSAL, NULL);
 }
开发者ID:MilchBuby,项目名称:riboncore,代码行数:7,代码来源:boss_kazrogal.cpp

示例15: JustDied

 void JustDied(Unit *victim)
 {
     if(pInstance && IsEvent)
         pInstance->SetData(DATA_RAGEWINTERCHILLEVENT, DONE);
     DoPlaySoundToSet(m_creature, SOUND_ONDEATH);
     DoYell(SAY_ONDEATH, LANG_UNIVERSAL, NULL);
 }
开发者ID:wk23,项目名称:tst,代码行数:7,代码来源:boss_rage_winterchill.cpp


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