本文整理汇总了C++中instance_icecrown_citadel::IsHeroicDifficulty方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_icecrown_citadel::IsHeroicDifficulty方法的具体用法?C++ instance_icecrown_citadel::IsHeroicDifficulty怎么用?C++ instance_icecrown_citadel::IsHeroicDifficulty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_icecrown_citadel
的用法示例。
在下文中一共展示了instance_icecrown_citadel::IsHeroicDifficulty方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Aggro
void Aggro(Unit* /*pWho*/) override
{
DoScriptText(SAY_AGGRO, m_creature);
DoCastSpellIfCan(m_creature, SPELL_SHROUD_OF_SORROW, CAST_TRIGGERED);
if (m_pInstance)
{
m_pInstance->SetData(TYPE_QUEEN_LANATHEL, IN_PROGRESS);
if (m_pInstance->IsHeroicDifficulty())
DoCastSpellIfCan(m_creature, SPELL_PRESENCE_OF_DARKFALLEN, CAST_TRIGGERED);
}
}
示例2: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
if (!m_pInstance)
return;
// Slime Spray
if (m_uiSlimeSprayTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_SLIME_SPRAY_SUMMON) == CAST_OK)
m_uiSlimeSprayTimer = urand(20000, 25000);
}
else
m_uiSlimeSprayTimer -= uiDiff;
// Mutated Infection - faster with time
// implemented this instead of phases
if (m_uiInfectionsRate < MAX_MUTATE_INFACTION_STEPS)
{
if (m_uiMutatedInfectionTimer <= uiDiff)
{
if (DoCastSpellIfCan(m_creature, uiMutatedInfections[m_uiInfectionsRate], CAST_TRIGGERED) == CAST_OK)
{
m_creature->RemoveAurasDueToSpell(uiMutatedInfections[m_uiInfectionsRate - 1]);
// every next 15 seconds faster
m_uiMutatedInfectionTimer = 60000 - m_uiInfectionsRate * 15000;
++m_uiInfectionsRate;
}
}
else
m_uiMutatedInfectionTimer -= uiDiff;
}
// Heroic spells
if (m_pInstance->IsHeroicDifficulty())
{
if (m_uiVileGasTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_VILE_TRIGGER) == CAST_OK)
m_uiVileGasTimer = 30000;
}
else
m_uiVileGasTimer -= uiDiff;
}
DoMeleeAttackIfReady();
}
示例3: Reset
void Reset() override
{
m_uiRuneOfBloodTimer = 25000;
m_uiBoilingBloodTimer = 19000;
m_uiBloodNovaTimer = 20000;
m_uiBloodBeastsTimer = 40000;
m_uiScentOfBloodTimer = 47000;
m_uiBerserkTimer = 8 * MINUTE * IN_MILLISECONDS;
if (m_pInstance && m_pInstance->IsHeroicDifficulty())
m_uiBerserkTimer = 6 * MINUTE * IN_MILLISECONDS;
m_bIsFrenzied = false;
m_creature->SetPower(m_powerBloodPower, 0);
}
示例4: Aggro
void Aggro(Unit* /*pWho*/) override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_ROTFACE, IN_PROGRESS);
if (Creature* pPutricide = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
{
pPutricide->CastSpell(pPutricide, SPELL_OOZE_FLOOD_PERIODIC, TRIGGERED_OLD_TRIGGERED);
pPutricide->SetWalk(false);
pPutricide->GetMotionMaster()->MovePoint(102, afBalconyLocation[0], afBalconyLocation[1], afBalconyLocation[2]);
// heroic aggro text
if (m_pInstance->IsHeroicDifficulty() && m_pInstance->GetData(TYPE_FESTERGUT) == DONE)
DoScriptText(SAY_PUTRICIDE_AGGRO, pPutricide);
}
}
DoScriptText(SAY_AGGRO, m_creature);
DoCastSpellIfCan(m_creature, SPELL_MUTATED_INFECTION_1, CAST_TRIGGERED);
}
示例5: 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)
//.........这里部分代码省略.........
示例6: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
switch (m_uiPhase)
{
case PHASE_NORMAL:
// Coldflame
if (m_uiColdflameTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_COLDFLAME) == CAST_OK)
m_uiColdflameTimer = 5000;
}
else
m_uiColdflameTimer -= uiDiff;
// Bone Storm
if (m_uiBoneStormTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BONE_STORM) == CAST_OK)
{
// ToDo: research if we need to increase the speed here
DoScriptText(SAY_BONE_STORM, m_creature);
m_uiPhase = PHASE_BONE_STORM_CHARGE;
SetCombatMovement(false);
m_creature->GetMotionMaster()->MoveIdle();
m_uiBoneStormTimer = 90000;
}
}
else
m_uiBoneStormTimer -= uiDiff;
// Bone Slice
if (m_uiBoneSliceTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BONE_SLICE) == CAST_OK)
m_uiBoneSliceTimer = 1000;
}
else
m_uiBoneSliceTimer -= uiDiff;
DoMeleeAttackIfReady();
break;
case PHASE_BONE_STORM_CHARGE:
// next charge to random enemy
if (m_uiBoneStormChargeTimer < uiDiff)
{
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0, uint32(0), SELECT_FLAG_PLAYER))
{
float fX, fY, fZ;
pTarget->GetPosition(fX, fY, fZ);
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MovePoint(1, fX, fY, fZ);
m_uiBoneStormChargeTimer = 3000;
m_uiPhase = PHASE_BONE_STORM_CHARGING;
}
}
else
m_uiBoneStormChargeTimer -= uiDiff;
break;
case PHASE_BONE_STORM_CHARGING:
// waiting to arrive at target position
break;
case PHASE_BONE_STORM_COLDFLAME:
if (m_uiBoneStormColdflameTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_COLDFLAME_STORM) == CAST_OK)
{
// When the max cold flame charges are reached, remove Bone storm aura
if (m_uiChargesCount == m_uiMaxCharges)
{
m_creature->RemoveAurasDueToSpell(SPELL_BONE_STORM);
m_uiBoneStormTimer = 60000;
m_uiBoneSliceTimer = 10000;
SetCombatMovement(true);
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
m_uiChargesCount = 0;
m_uiPhase = PHASE_NORMAL;
}
else
m_uiPhase = PHASE_BONE_STORM_CHARGE;
m_uiBoneStormColdflameTimer = 1000;
}
}
else
m_uiBoneStormColdflameTimer -= uiDiff;
break;
}
// Bone spike - different spells for the normal phase or storm phase
if (m_pInstance && (m_pInstance->IsHeroicDifficulty() || m_uiPhase == PHASE_NORMAL))
{
//.........这里部分代码省略.........
示例7: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (m_uiPhase != PHASE_INTRO && m_uiPhase != PHASE_DEATH_AWAITS)
{
// check evade
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
// Berserk
if (m_uiBerserkTimer)
{
if (m_uiBerserkTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK)
{
DoScriptText(SAY_ENRAGE, m_creature);
m_uiBerserkTimer = 0;
}
}
else
m_uiBerserkTimer -= uiDiff;
}
}
switch (m_uiPhase)
{
case PHASE_INTRO:
{
// wait until set in combat
return;
}
case PHASE_ONE:
{
// check HP
if (m_creature->GetHealthPercent() <= 70.0f)
{
// phase transition
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MovePoint(POINT_CENTER_LAND, fLichKingPosition[1][0], fLichKingPosition[1][1], fLichKingPosition[1][2]);
m_uiPhase = PHASE_RUNNING_WINTER_ONE;
return;
}
// Necrotic Plague
if (m_uiNecroticPlagueTimer < uiDiff)
{
// shouldn't be targeting players who already have Necrotic Plague on them
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_NECROTIC_PLAGUE, SELECT_FLAG_PLAYER))
{
if (DoCastSpellIfCan(pTarget, SPELL_NECROTIC_PLAGUE) == CAST_OK)
m_uiNecroticPlagueTimer = 30000;
}
}
else
m_uiNecroticPlagueTimer -= uiDiff;
// Infest
if (m_uiInfestTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_INFEST) == CAST_OK)
m_uiInfestTimer = urand(20000, 25000);
}
else
m_uiInfestTimer -= uiDiff;
// Summon Ghouls
if (m_uiGhoulsTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_GHOULS) == CAST_OK)
m_uiGhoulsTimer = 32000;
}
else
m_uiGhoulsTimer -= uiDiff;
// Summon Shambling Horror
if (m_uiHorrorTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_HORROR) == CAST_OK)
m_uiHorrorTimer = 60000;
}
else
m_uiHorrorTimer -= uiDiff;
// Shadow Trap (heroic)
if (m_pInstance && m_pInstance->IsHeroicDifficulty())
{
if (m_uiShadowTrapTimer < uiDiff)
{
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, SPELL_SHADOW_TRAP, SELECT_FLAG_PLAYER))
{
if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_TRAP) == CAST_OK)
m_uiShadowTrapTimer = 15000;
}
}
else
m_uiShadowTrapTimer -= uiDiff;
}
DoMeleeAttackIfReady();
//.........这里部分代码省略.........
示例8: 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)
{
//.........这里部分代码省略.........
示例9: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
if (m_uiEnrageTimer)
{
if (m_uiEnrageTimer <= uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK)
{
DoScriptText(SAY_BERSERK, m_creature);
m_uiEnrageTimer = 0;
}
}
else
m_uiEnrageTimer -= uiDiff;
}
switch (m_uiPhase)
{
case PHASE_GROUND:
{
// Air phase change timer
if (m_uiPhaseTimer < uiDiff)
{
SetCombatMovement(false);
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MovePoint(POINT_CENTER_GROUND, aQueenPosition[0][0], aQueenPosition[0][1], aQueenPosition[0][2]);
m_uiPhase = PHASE_RUNNING;
m_uiPhaseTimer = 0;
}
else
m_uiPhaseTimer -= uiDiff;
// Only one bite per fight
if (m_uiVampiricBiteTimer)
{
if (m_uiVampiricBiteTimer <= uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_VAMPIRIC_BITE) == CAST_OK)
{
DoScriptText(urand(0, 1) ? SAY_BITE_1 : SAY_BITE_2, m_creature);
m_uiVampiricBiteTimer = 0;
}
}
else
m_uiVampiricBiteTimer -= uiDiff;
}
if (m_uiBloodMirrorTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BLOOD_MIRROR) == CAST_OK)
m_uiBloodMirrorTimer = 5000;
}
else
m_uiBloodMirrorTimer -= uiDiff;
if (m_uiBloodboltTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_TWILIGHT_BLOODBOLT) == CAST_OK)
m_uiBloodboltTimer = urand(15000, 20000);
}
else
m_uiBloodboltTimer -= uiDiff;
if (m_uiPactDarkfallenTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_PACT_OF_THE_DARKFALLEN) == CAST_OK)
{
DoScriptText(SAY_PACT, m_creature);
m_uiPactDarkfallenTimer = urand(20000, 25000);
}
}
else
m_uiPactDarkfallenTimer -= uiDiff;
if (m_uiSwarmingShadowsTimer <= uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_SWARMING_SHADOWS) == CAST_OK)
{
DoScriptText(SAY_SHADOWS, m_creature);
m_uiSwarmingShadowsTimer = urand(30000, 35000);
}
}
else
m_uiSwarmingShadowsTimer -= uiDiff;
// Heroic spells
if (m_pInstance && m_pInstance->IsHeroicDifficulty())
{
if (m_uiDeliriousSlashTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_DELIRIOUS_SLASH) == CAST_OK)
m_uiDeliriousSlashTimer = 15000;
}
else
m_uiDeliriousSlashTimer -= uiDiff;
}
//.........这里部分代码省略.........