本文整理汇总了C++中instance_icecrown_citadel::Is25ManDifficulty方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_icecrown_citadel::Is25ManDifficulty方法的具体用法?C++ instance_icecrown_citadel::Is25ManDifficulty怎么用?C++ instance_icecrown_citadel::Is25ManDifficulty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_icecrown_citadel
的用法示例。
在下文中一共展示了instance_icecrown_citadel::Is25ManDifficulty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
if (!m_pInstance)
return;
// Berserk
if (m_uiBerserkTimer)
{
if (m_uiBerserkTimer <= uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK)
{
DoScriptText(SAY_BERSERK, m_creature);
m_uiBerserkTimer = 0;
}
}
else
m_uiBerserkTimer -= uiDiff;
}
if (m_uiGaseousBlightTimer)
{
if (m_uiGaseousBlightTimer <= uiDiff)
{
// two stage event; first trigger all the puddle stalkers around then set the room in gas
switch (m_uiGaseousBlightStage)
{
case 0:
if (Creature* pProfessor = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
{
pProfessor->HandleEmote(EMOTE_ONESHOT_TALK_NOSHEATHE);
pProfessor->CastSpell(pProfessor, SPELL_GASEOUS_BLIGHT_INIT, true);
DoScriptText((m_pInstance->GetData(TYPE_ROTFACE) == DONE && m_pInstance->IsHeroicDifficulty()) ? SAY_BLIGHT_ROTFACE_DEAD : SAY_BLIGHT, pProfessor);
}
m_uiGaseousBlightTimer = 1000;
break;
case 1:
if (DoCastSpellIfCan(m_creature, SPELL_GASEOUS_BLIGHT_1) == CAST_OK)
m_uiGaseousBlightTimer = 0;
break;
}
++m_uiGaseousBlightStage;
}
else
m_uiGaseousBlightTimer -= uiDiff;
}
// Inhale Blight and Pungent Blight
if (m_uiInhaleBlightTimer < uiDiff)
{
SpellAuraHolder* pHolder = m_creature->GetSpellAuraHolder(m_pInstance->Is25ManDifficulty() ? SPELL_INHALED_BLIGHT_25 : SPELL_INHALED_BLIGHT_10);
// inhale the gas or if already have 3 stacks - release it
if (pHolder && pHolder->GetStackAmount() >= 3)
{
if (DoCastSpellIfCan(m_creature, SPELL_PUNGENT_BLIGHT) == CAST_OK)
{
DoScriptText(SAY_PUNGUENT_BLIGHT, m_creature);
m_uiInhaleBlightTimer = 38000;
}
}
else
{
if (DoCastSpellIfCan(m_creature, SPELL_INHALE_BLIGHT) == CAST_OK)
m_uiInhaleBlightTimer = 36000;
}
}
else
m_uiInhaleBlightTimer -= uiDiff;
// Gas Spore
if (m_uiGasSporeTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_GAS_SPORE) == CAST_OK)
{
DoScriptText(EMOTE_SPORES, m_creature);
m_uiGasSporeTimer = 40000;
}
}
else
m_uiGasSporeTimer -= uiDiff;
// Vile Gas
if (m_uiVileGasTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_VILE_GAS) == CAST_OK)
m_uiVileGasTimer = 30000;
}
else
m_uiVileGasTimer -= uiDiff;
// Heroic spells
if (m_pInstance->IsHeroicDifficulty())
{
if (m_uiMalleableGooTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_MALLEABLE_GOO_SUMMON) == CAST_OK)
//.........这里部分代码省略.........
示例2: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
// Mark of the Fallen Champion
// ToDo: enable this when blood power is fully supported by the core
/*if (m_creature->GetPower(m_powerBloodPower) >= 100)
{
if (Unit* pTarget = SelectRandomPlayerForMark())
{
if (DoCastSpellIfCan(pTarget, SPELL_MARK_FALLEN_CHAMPION) == CAST_OK)
{
DoScriptText(SAY_FALLENCHAMPION, m_creature);
m_creature->SetPower(m_powerBloodPower, 0);
}
}
}*/
// Frenzy (soft enrage)
if (!m_bIsFrenzied)
{
if (m_creature->GetHealthPercent() <= 30.0f)
{
if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK)
{
DoScriptText(EMOTE_FRENZY, m_creature);
m_bIsFrenzied = true;
}
}
}
// Berserk (hard enrage)
if (m_uiBerserkTimer)
{
if (m_uiBerserkTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK)
{
DoScriptText(SAY_BERSERK, m_creature);
m_uiBerserkTimer = 0;
}
}
else
m_uiBerserkTimer -= uiDiff;
}
// Rune of Blood
if (m_uiRuneOfBloodTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_RUNE_OF_BLOOD) == CAST_OK)
m_uiRuneOfBloodTimer = 25000;
}
else
m_uiRuneOfBloodTimer -= uiDiff;
// Boiling Blood
if (m_uiBoilingBloodTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BOILING_BLOOD) == CAST_OK)
m_uiBoilingBloodTimer = 15000;
}
else
m_uiBoilingBloodTimer -= uiDiff;
// Blood Nova
if (m_uiBloodNovaTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BLOOD_NOVA) == CAST_OK)
m_uiBloodNovaTimer = 20000;
}
else
m_uiBloodNovaTimer -= uiDiff;
// Call Blood Beasts
if (m_uiBloodBeastsTimer < uiDiff)
{
DoScriptText(SAY_BLOODBEASTS, m_creature);
DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_1, CAST_TRIGGERED);
DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_2, CAST_TRIGGERED);
if (m_pInstance && m_pInstance->Is25ManDifficulty())
{
DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_3, CAST_TRIGGERED);
DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_4, CAST_TRIGGERED);
DoCastSpellIfCan(m_creature, SPELL_CALL_BLOOD_BEAST_5, CAST_TRIGGERED);
}
m_uiBloodBeastsTimer = 40000;
m_uiScentOfBloodTimer = 7000;
}
else
m_uiBloodBeastsTimer -= uiDiff;
// Scent of Blood
if (m_pInstance && m_pInstance->IsHeroicDifficulty())
{
if (m_uiScentOfBloodTimer < uiDiff)
{
//.........这里部分代码省略.........