本文整理汇总了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;
}
}
}
示例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();
}
示例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;
}
示例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();
}
示例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);
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
}
示例10: Aggro
void Aggro(Unit* pWho)
{
m_creature->SetInCombatWithZone();
DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL);
DoPlaySoundToSet(m_creature, 8272);
}
示例11: JustDied
void JustDied(Unit* Killer)
{
DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL);
DoPlaySoundToSet(m_creature,SOUND_DEATH);
if( pInstance )
pInstance->SetData(TYPE_HARBINGERSKYRISS,DONE);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}