本文整理汇总了C++中instance_sunwell_plateau类的典型用法代码示例。如果您正苦于以下问题:C++ instance_sunwell_plateau类的具体用法?C++ instance_sunwell_plateau怎么用?C++ instance_sunwell_plateau使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了instance_sunwell_plateau类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JustReachedHome
void JustReachedHome()
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_KILJAEDEN, FAIL);
// Reset the corrupt Sunwell aura
if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER))
pKiljaedenController->CastSpell(pKiljaedenController, SPELL_ANVEENA_DRAIN, true);
// Respawn Anveena if necessary
if (Creature* pAnveena = m_pInstance->GetSingleCreatureFromStorage(NPC_ANVEENA))
{
if (!pAnveena->isAlive())
pAnveena->Respawn();
}
// Despawn Kalec if already summoned
if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS, true))
pKalec->ForcedDespawn();
}
// Despawn on wipe
m_creature->ForcedDespawn();
}
示例2: DamageTaken
void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage, DamageEffectType /*damagetype*/) override
{
if (uiDamage > m_creature->GetHealth())
{
uiDamage = 0;
if (m_bIsBanished)
return;
// banish Sathrovarr and eject the players
if (DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED) == CAST_OK)
m_bIsBanished = true;
if (!m_pInstance)
return;
if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON))
{
if (boss_kalecgosAI* pKalecgosAI = dynamic_cast<boss_kalecgosAI*>(pKalecgos->AI()))
pKalecgosAI->m_bIsUncorrupted = true;
}
m_pInstance->DoEjectSpectralPlayers();
}
}
示例3: JustReachedHome
void JustReachedHome() override
{
if (m_pInstance)
{
m_pInstance->DoEjectSpectralPlayers();
m_pInstance->SetData(TYPE_KALECGOS, FAIL);
}
}
示例4: JustDied
void JustDied(Unit* /*pKiller*/) override
{
if (m_pInstance)
{
m_pInstance->DoEjectSpectralPlayers();
m_pInstance->SetData(TYPE_KALECGOS, FAIL);
}
}
示例5: JustDidDialogueStep
void JustDidDialogueStep(int32 iEntry)
{
if (!m_pInstance)
return;
switch (iEntry)
{
case NPC_KALECGOS:
if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS))
{
pKalec->CastSpell(pKalec, SPELL_KALEC_TELEPORT, true);
pKalec->SetLevitate(false);
}
m_creature->SummonCreature(NPC_CORE_ENTROPIUS, m_creature->GetPositionX(), m_creature->GetPositionY(), 85.0f, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
break;
case NPC_BOSS_PORTAL:
// ToDo: summon soldiers to the right
m_creature->SummonCreature(NPC_BOSS_PORTAL, aOutroLocations[0].m_fX, aOutroLocations[0].m_fY, aOutroLocations[0].m_fZ, aOutroLocations[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0);
break;
case POINT_SUMMON_SOLDIERS:
// ToDo: summon soldiers to the left
break;
case NPC_VELEN:
m_creature->SummonCreature(NPC_VELEN, aOutroLocations[1].m_fX, aOutroLocations[1].m_fY, aOutroLocations[1].m_fZ, aOutroLocations[1].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0);
break;
case NPC_LIADRIN:
m_creature->SummonCreature(NPC_LIADRIN, aOutroLocations[2].m_fX, aOutroLocations[2].m_fY, aOutroLocations[2].m_fZ, aOutroLocations[2].m_fO, TEMPSUMMON_TIMED_DESPAWN, 4*MINUTE*IN_MILLISECONDS);
break;
case SPELL_CALL_ENTROPIUS:
if (Creature* pVelen = m_pInstance->GetSingleCreatureFromStorage(NPC_VELEN))
pVelen->CastSpell(pVelen, SPELL_CALL_ENTROPIUS, false);
// Set point id = 1 for movement event
if (Creature* pEntropius = m_creature->GetMap()->GetCreature(m_EntropiusGuid))
{
pEntropius->SetWalk(false);
pEntropius->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), 35.0f);
}
break;
case POINT_MOVE_LIADRIN:
if (Creature* pLiadrin = m_pInstance->GetSingleCreatureFromStorage(NPC_LIADRIN))
pLiadrin->GetMotionMaster()->MovePoint(0, aOutroLocations[4].m_fX, aOutroLocations[4].m_fY, aOutroLocations[4].m_fZ);
break;
case SPELL_BLAZE_TO_LIGHT:
if (Creature* pEntropius = m_creature->GetMap()->GetCreature(m_EntropiusGuid))
{
pEntropius->CastSpell(pEntropius, SPELL_BLAZE_TO_LIGHT, true);
pEntropius->RemoveAurasDueToSpell(SPELL_ENTROPIUS_BODY);
pEntropius->SetWalk(true);
pEntropius->GetMotionMaster()->MovePoint(2, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
}
break;
case POINT_EVENT_EXIT:
// Set point id = 1 for the despawn event
if (Creature* pVelen = m_pInstance->GetSingleCreatureFromStorage(NPC_VELEN))
pVelen->GetMotionMaster()->MovePoint(1, aOutroLocations[1].m_fX, aOutroLocations[1].m_fY, aOutroLocations[1].m_fZ);
break;
}
}
示例6: JustDied
void JustDied(Unit* pKiller)
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_KILJAEDEN, DONE);
// Start the outro
if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER))
{
if (npc_kiljaeden_controllerAI* pControllerAI = dynamic_cast<npc_kiljaeden_controllerAI*>(pKiljaedenController->AI()))
pControllerAI->DoStartOutroDialogue();
}
}
}
示例7: JustReachedHome
void JustReachedHome()
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_MURU, FAIL);
// respawn muru
if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU))
pMuru->Respawn();
}
// despawn boss and summons for reset
DespawnSummonedCreatures();
m_creature->ForcedDespawn();
}
示例8: Aggro
void Aggro(Unit* /*pWho*/) override
{
DoScriptText(SAY_EVIL_AGGRO, m_creature);
if (m_pInstance)
m_pInstance->SetData(TYPE_KALECGOS, IN_PROGRESS);
}
示例9: JustDied
void JustDied(Unit* /*pKiller*/) override
{
DoScriptText(SAY_DEATH, m_creature);
if (m_pInstance)
m_pInstance->SetData(TYPE_FELMYST, DONE);
}
示例10: Aggro
void Aggro(Unit* pWho)
{
if (m_pInstance)
m_pInstance->SetData(TYPE_KILJAEDEN, IN_PROGRESS);
DoScriptText(SAY_EMERGE, m_creature);
DoCastSpellIfCan(m_creature, SPELL_BIRTH);
}
示例11: JustDied
void JustDied(Unit* pKiller)
{
if (m_pInstance)
m_pInstance->SetData(TYPE_MURU, DONE);
// Despawn summoned creatures
DespawnSummonedCreatures();
}
示例12: JustDied
void JustDied(Unit* /*pKiller*/) override
{
if (m_pInstance)
{ m_pInstance->SetData(TYPE_MURU, DONE); }
#if defined (CLASSIC) || defined (TBC)
// Despawn summoned creatures
DespawnSummonedCreatures();
#endif
}
示例13: Aggro
void Aggro(Unit* pWho) override
{
DoCastSpellIfCan(m_creature, SPELL_NOXIOUS_FUMES);
if (m_pInstance)
m_pInstance->SetData(TYPE_FELMYST, IN_PROGRESS);
float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
m_creature->GetMotionMaster()->MovePoint(PHASE_TRANSITION, pWho->GetPositionX(), pWho->GetPositionY(), fGroundZ, false);
m_creature->HandleEmote(EMOTE_ONESHOT_LAND);
}
示例14: JustSummoned
void JustSummoned(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_VOID_SENTINEL)
{
// Attack Muru's target
if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU))
{
if (Unit* pTarget = pMuru->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
{ pSummoned->AI()->AttackStart(pTarget); }
}
}
}
示例15: MovementInform
void MovementInform(uint32 uiMotionType, uint32 uiPointId) override
{
if (uiMotionType != POINT_MOTION_TYPE)
return;
if (uiPointId)
{
if (m_pInstance)
m_pInstance->SetData(TYPE_KALECGOS, DONE);
m_creature->ForcedDespawn(1000);
}
}