本文整理汇总了C++中instance_icecrown_citadel::GetSingleCreatureFromStorage方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_icecrown_citadel::GetSingleCreatureFromStorage方法的具体用法?C++ instance_icecrown_citadel::GetSingleCreatureFromStorage怎么用?C++ instance_icecrown_citadel::GetSingleCreatureFromStorage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_icecrown_citadel
的用法示例。
在下文中一共展示了instance_icecrown_citadel::GetSingleCreatureFromStorage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JustReachedHome
void JustReachedHome() override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_FESTERGUT, FAIL);
// reset gas stalker and putricide
if (Creature* pStalker = m_pInstance->GetSingleCreatureFromStorage(NPC_GAS_STALKER))
pStalker->RemoveAllAurasOnEvade();
if (Creature* pPutricide = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
pPutricide->AI()->EnterEvadeMode();
}
DoCastSpellIfCan(m_creature, SPELL_REMOVE_INOCULENT, CAST_TRIGGERED);
}
示例2: JustDied
void JustDied(Unit* /*pKiller*/) override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_FESTERGUT, DONE);
// reset gas stalker and putricide
if (Creature* pStalker = m_pInstance->GetSingleCreatureFromStorage(NPC_GAS_STALKER))
pStalker->RemoveAllAurasOnEvade();
// ToDo: research if there is any event/yell happening on boss death
if (Creature* pPutricide = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
pPutricide->AI()->EnterEvadeMode();
}
DoScriptText(SAY_DEATH, m_creature);
DoCastSpellIfCan(m_creature, SPELL_REMOVE_INOCULENT, CAST_TRIGGERED);
}
示例3: JustSummoned
void JustSummoned(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_MALLEABLE_OOZE_STALKER)
{
if (!m_pInstance)
return;
if (Creature* pPutricide = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
pPutricide->CastSpell(pSummoned, SPELL_MALLEABLE_GOO, true);
}
}
示例4: JustDied
void JustDied(Unit* /*pKiller*/) override
{
if (!m_pInstance)
return;
Creature* pRimefang = m_pInstance->GetSingleCreatureFromStorage(NPC_RIMEFANG);
if (!pRimefang || !pRimefang->isAlive())
{
if (Creature* pSindragosa = m_creature->SummonCreature(NPC_SINDRAGOSA, SindragosaPosition[7][0], SindragosaPosition[7][1], SindragosaPosition[7][2], 0.0f, TEMPSPAWN_MANUAL_DESPAWN, 0))
pSindragosa->SetInCombatWithZone();
}
}
示例5: JustReachedHome
void JustReachedHome() override
{
DoCastSpellIfCan(m_creature, SPELL_OOZE_FLOOD_REMOVE, CAST_TRIGGERED);
if (m_pInstance)
{
m_pInstance->SetData(TYPE_ROTFACE, FAIL);
// reset putricide
if (Creature* pPutricide = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
pPutricide->AI()->EnterEvadeMode();
}
}
示例6: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
// On evade, reset the blood orb on Valanar
if (m_uiResetTimer)
{
if (m_uiResetTimer <= uiDiff)
{
if (m_pInstance)
{
if (Creature* pOrb = m_pInstance->GetSingleCreatureFromStorage(NPC_BLOOD_ORB_CONTROL))
pOrb->CastSpell(pOrb, SPELL_INVOCATION_VALANAR, TRIGGERED_NONE);
m_uiResetTimer = 0;
}
}
else
m_uiResetTimer -= uiDiff;
}
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
// Invocation of Blood
if (m_uiEmpowermentTimer)
{
if (m_uiEmpowermentTimer <= uiDiff)
{
m_creature->RemoveAurasDueToSpell(m_uiInvocationSpellEntry);
m_creature->SetHealth(1);
m_bIsSaidSpecial = false;
m_uiEmpowermentTimer = 00;
}
else
m_uiEmpowermentTimer -= uiDiff;
}
// Berserk
if (m_uiBerserkTimer)
{
if (m_uiBerserkTimer <= uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK)
{
DoScriptText(m_iSayBerserkEntry, m_creature);
m_uiBerserkTimer = 0;
}
}
else
m_uiBerserkTimer -= uiDiff;
}
}
示例7: DamageTaken
void DamageTaken(Unit* /*pDealer*/, uint32& uiDamage) override
{
// Damage is shared by the Blood Orb Control npc
if (!m_uiEmpowermentTimer)
uiDamage = 0;
// ##### Workaround for missing aura 300 - Remove when this is implemented in core #####
if (!m_pInstance || !uiDamage)
return;
if (Creature* pOrb = m_pInstance->GetSingleCreatureFromStorage(NPC_BLOOD_ORB_CONTROL))
pOrb->DealDamage(pOrb, uiDamage, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
// ##### End of workaround #####
}
示例8: JustDied
void JustDied(Unit* /*pKiller*/) override
{
DoCastSpellIfCan(m_creature, SPELL_OOZE_FLOOD_REMOVE, CAST_TRIGGERED);
if (m_pInstance)
{
m_pInstance->SetData(TYPE_ROTFACE, DONE);
// reset putricide
if (Creature* pPutricide = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
pPutricide->AI()->EnterEvadeMode();
}
DoScriptText(SAY_DEATH, m_creature);
}
示例9: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
// Slime Spray
if (m_uiSlimeSprayTimer <= uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_SLIME_SPRAY) == CAST_OK)
{
DoScriptText(SAY_SLIME_SPRAY, m_creature);
m_uiSlimeSprayTimer = urand(17000, 23000);
}
}
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;
}
// Slime Flow
if (m_uiSlimeFlowTimer <= uiDiff)
{
if (Creature* pProfessor = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
DoScriptText(urand(0, 1) ? SAY_SLIME_FLOW_1 : SAY_SLIME_FLOW_2, pProfessor);
m_uiSlimeFlowTimer = 20000;
}
else
m_uiSlimeFlowTimer -= uiDiff;
DoMeleeAttackIfReady();
}
示例10: Aggro
void Aggro(Unit* /*pWho*/) override
{
DoScriptText(SAY_AGGRO, m_creature);
DoCastSpellIfCan(m_creature, SPELL_GASTRIC_BLOAT, CAST_TRIGGERED);
// set encounter in progress and get professor to the balcony
if (m_pInstance)
{
m_pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS);
if (Creature* pPutricide = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
{
pPutricide->SetWalk(false);
pPutricide->GetMotionMaster()->MovePoint(101, afBalconyLocation[0], afBalconyLocation[1], afBalconyLocation[2]);
}
}
}
示例11: JustSummoned
void JustSummoned(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_OOZE_SPRAY_STALKER)
{
DoScriptText(EMOTE_SLIME_SPRAY, m_creature);
DoCastSpellIfCan(pSummoned, SPELL_SLIME_SPRAY, CAST_TRIGGERED);
DoCastSpellIfCan(pSummoned, SPELL_FACE_SPRAY_STALKER, CAST_TRIGGERED);
}
else if (pSummoned->GetEntry() == NPC_VILE_GAS_STALKER)
{
if (!m_pInstance)
return;
if (Creature* pPutricide = m_pInstance->GetSingleCreatureFromStorage(NPC_PROFESSOR_PUTRICIDE))
pPutricide->CastSpell(pSummoned, SPELL_VILE_GAS, TRIGGERED_OLD_TRIGGERED);
}
}
示例12: ReceiveAIEvent
void ReceiveAIEvent(AIEventType eventType, Creature* pSender, Unit* pInvoker, uint32 uiMiscValue) override
{
if (eventType == AI_EVENT_CUSTOM_A)
{
// prepare explosion; Rotface yells and achiev is failed
if (DoCastSpellIfCan(m_creature, SPELL_UNSTABLE_EXPLOSION) == CAST_OK)
{
if (m_pInstance)
{
if (Creature* pRotface = m_pInstance->GetSingleCreatureFromStorage(NPC_ROTFACE))
DoScriptText(SAY_OOZE_EXPLODE, pRotface);
m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_DANCES_OOZES, false);
}
m_uiUnstableExplosionTimer = 5000;
}
}
}
示例13: 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);
}
示例14: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
// Frost Bomb (dmg)
if (m_uiFrostBombTimer)
{
if (m_uiFrostBombTimer <= uiDiff)
{
if (m_pInstance)
{
if (Creature* pSindragosa = m_pInstance->GetSingleCreatureFromStorage(NPC_SINDRAGOSA))
{
if (pSindragosa->AI()->DoCastSpellIfCan(m_creature, SPELL_FROST_BOMB_DMG) == CAST_OK)
{
m_creature->RemoveAurasDueToSpell(SPELL_FROST_BOMB_VISUAL);
m_creature->ForcedDespawn(2000);
m_uiFrostBombTimer = 0;
}
}
}
}
else
m_uiFrostBombTimer -= uiDiff;
}
}
示例15: 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)
//.........这里部分代码省略.........