本文整理汇总了C++中BossSpellWorker::doCast方法的典型用法代码示例。如果您正苦于以下问题:C++ BossSpellWorker::doCast方法的具体用法?C++ BossSpellWorker::doCast怎么用?C++ BossSpellWorker::doCast使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BossSpellWorker
的用法示例。
在下文中一共展示了BossSpellWorker::doCast方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Aggro
void Aggro(Unit* pWho)
{
if (!m_pInstance) return;
m_creature->SetInCombatWithZone();
m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
DoScriptText(-1713514,m_creature);
bsw->doCast(SPELL_NETHER_POWER);
}
示例2: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
bsw->timedCast(SPELL_BATTER, uiDiff);
if (bsw->timedCast(SPELL_FIRE_BOMB, uiDiff, m_creature->getVictim()) == CAST_OK)
{
bsw->doCast(SPELL_FIRE_BOMB_1, m_creature->getVictim());
bsw->doCast(SPELL_FIRE_BOMB_DOT, m_creature->getVictim());
}
bsw->timedCast(SPELL_HEAD_CRACK, uiDiff);
DoMeleeAttackIfReady();
}
示例3: Reset
void Reset()
{
pBoss = NULL;
defaultTarget = NULL;
m_creature->SetInCombatWithZone();
m_creature->SetRespawnDelay(DAY);
pBoss = (Creature*)Unit::GetUnit((*m_creature),m_pInstance->GetData64(NPC_GORMOK));
if (pBoss) bsw->doCast(SPELL_RISING_ANGER,pBoss);
}
示例4: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
bsw->timedCast(SPELL_FEL_FIREBALL, uiDiff);
bsw->timedCast(SPELL_FEL_LIGHTING, uiDiff);
if (bsw->timedQuery(SPELL_INCINERATE_FLESH, uiDiff))
{
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
{
DoScriptText(-1713522,m_creature,pTarget);
bsw->doCast(SPELL_INCINERATE_FLESH,pTarget);
}
}
if (bsw->timedQuery(SPELL_LEGION_FLAME_1, uiDiff))
{
DoScriptText(-1713518,m_creature);
bsw->doCast(SPELL_LEGION_FLAME_1);
};
if (bsw->timedQuery(SPELL_INFERNAL_ERUPTION, uiDiff) && m_volcanoCount > 0)
{
DoScriptText(-1713520,m_creature);
if (bsw->doCast(NPC_INFERNAL_VOLCANO) == CAST_OK) --m_volcanoCount;
};
if (bsw->timedQuery(SPELL_NETHER_PORTAL, uiDiff) &&
m_portalsCount > 0 && m_creature->GetHealthPercent() <= 90.0f)
{
DoScriptText(-1713519,m_creature);
if (bsw->doCast(NPC_NETHER_PORTAL) == CAST_OK) --m_portalsCount;
};
DoMeleeAttackIfReady();
}
示例5: Reset
void Reset()
{
pBoss = NULL;
defaultTarget = NULL;
me->SetInCombatWithZone();
me->SetRespawnDelay(DAY);
pBoss = Unit::GetCreature((*me),m_pInstance->GetData64(NPC_GORMOK));
if (pBoss) bsw->doCast(SPELL_RISING_ANGER,pBoss);
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
me->GetMotionMaster()->MoveChase(pTarget);
me->SetSpeed(MOVE_RUN, 1);
}
}
示例6: Aggro
void Aggro(Unit *who)
{
if (!m_pInstance) return;
defaultTarget = who;
bsw->doCast(SPELL_SNOBOLLED, defaultTarget);
}
示例7: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (m_pInstance && !Unit::GetCreature((*me), m_pInstance->GetData64(NPC_ACIDMAW)))
this->JustReachedHome();
if (!UpdateVictim())
return;
switch (stage)
{
case 0: {
bsw->timedCast(SPELL_BURNING_BITE, uiDiff);
bsw->timedCast(SPELL_MOLTEN_SPEW, uiDiff);
bsw->timedCast(SPELL_FIRE_SPIT, uiDiff);
bsw->timedCast(SPELL_BURNING_SPRAY, uiDiff);
bsw->timedCast(SPELL_SWEEP_0, uiDiff);
if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED)
stage = 1;
break;}
case 1: {
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
bsw->doCast(SPELL_SUBMERGE_0);
stage = 2;
DoScriptText(-1713557,me);
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DREADSCALE_SUBMERGED);
break;}
case 2: {
if (bsw->timedQuery(SPELL_SLIME_POOL, uiDiff))
bsw->doCast(NPC_SLIME_POOL);
if (bsw->timedQuery(SPELL_SUBMERGE_0, uiDiff) && m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == DREADSCALE_SUBMERGED)
stage = 3;
break;}
case 3: {
DoScriptText(-1713559,me);
bsw->doRemove(SPELL_SUBMERGE_0);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
bsw->resetTimer(SPELL_SLIME_POOL);
stage = 0;
m_pInstance->SetData(TYPE_NORTHREND_BEASTS, ACIDMAW_SUBMERGED);
break;}
}
if (m_pInstance->GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && !enraged)
{
DoScriptText(-1713559,me);
bsw->doRemove(SPELL_SUBMERGE_0);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
bsw->doCast(SPELL_ENRAGE);
enraged = true;
stage = 0;
DoScriptText(-1713504,me);
};
DoMeleeAttackIfReady();
}